Skip to content

Re-adding window.jQuery to autoProvidejQuery #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2017

Conversation

weaverryan
Copy link
Member

@weaverryan weaverryan commented Jun 25, 2017

By adding window.jQuery to autoProvidejQuery(), it caused problems by making window.jQuery = require('jquery') not work (#32). But, not having it causes other obvious problems (see #52).

This re-adds window.jQuery back. As a fix, we would document exposing jQuery as a global variable by doing this:

global.$ = global.jQuery = require('jquery');

ping @alOneh

@jdreesen
Copy link
Contributor

jdreesen commented Jun 25, 2017

Don't you mean jQuery should be exposed by doing this instead (as described in your comment in #32 (comment)):

global.$ = global.jQuery = require('jquery');

@weaverryan
Copy link
Member Author

Thanks @jdreesen - I copied the wrong version :). Updated my comment

@weaverryan weaverryan merged commit 9653f1e into symfony:master Jun 28, 2017
weaverryan added a commit that referenced this pull request Jun 28, 2017
This PR was merged into the master branch.

Discussion
----------

Re-adding window.jQuery to autoProvidejQuery

By adding `window.jQuery` to `autoProvidejQuery()`, it caused problems by making `window.jQuery = require('jquery')` not work (#32). But, *not* having it causes other obvious problems (see #52).

This re-adds `window.jQuery` back. As a fix, we would document exposing jQuery as a global variable by doing this:

```js
global.$ = global.jQuery = require('jquery');
```

ping @alOneh

Commits
-------

9653f1e re-adding window.jQuery to autoProvidejQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants