microsoft / vscode-loader

An universal Asynchronous Module Definition (AMD) Loader developed primarily to load VSCode's sources.
Other
170 stars 55 forks source link

Loader conflicts with jQuery Validation Plugin #19

Closed Maximres closed 5 years ago

Maximres commented 6 years ago

Loader version: 0.12.0(160c7612faa359c4f196a0f3292a0f2752a1daf5) jq validator version: 1.14.0 There are 2 issues:

loader.js throws exception with message "Can only have one anonymous define call per script file" after trying to load jquery.validate.js file second time (that is, jquery.validate.js already exists in sources, but load it once again).

image

When jquery.validate.js is downloaded via require() function exception is gone, but validator calls for dependencies (JQuery) which already included in source. Furthermore, dependency name is incomplete (but this is validate.js fault).

Is there any way to get rid of this exception (loading validator manually) or could you provide api to exclude dependencies?

alexdima commented 6 years ago

Some piece of code that you are loading is invoking define with an anonymous module id. You could:

Good luck!