You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, if the jquery plugin is used before the dist jquery is loaded, the jquery plugin will try to get the jquery module foo at jquery/dist/jquery.min/src/foo.js (since the jquery globals are not set yet).
I don't see an easy way to solve this. Maybe @wkeese have an idea on this ?
I don't even understand what you are doing. If you want to use the "dist version" of jquery you should load it via an explicit <script> tag.
If you want to load jquery through requirejs, then it should be handled like any other package: installed via bower and optionally minified/built into a layer using the ibm-js builder.
If you want to use the "dist version" of jquery you should load it via an explicit <script> tag.
Some user will use requirejs to load the build version of jquery and then load scripts that depends on it.
This is documented in requirejs documentation with sample like this:
In this case, the user don't know which parts of jquery colorize depends on, so he cannot use the jquery plugin and needs to load the whole library at once.
For example this problem appears when you mix code using the dist version of jquery and code using the jquery plugin.
To load the dist version of jQuery with requirejs you need something like:
Then, if the jquery plugin is used before the dist jquery is loaded, the jquery plugin will try to get the jquery module
foo
atjquery/dist/jquery.min/src/foo.js
(since the jquery globals are not set yet).I don't see an easy way to solve this. Maybe @wkeese have an idea on this ?
PS: issue encountered by @edchat.
edit: if jquery is loaded before the use of the jquery plugin, it's ok because the globals are set and the plugin returns them.
The text was updated successfully, but these errors were encountered: