Skip to content

Commit 2c3832a

Browse files
author
Gil Greenberg
authored
Add check for jquery and prefix mixins! to import name
Magento added a jQuery patch in all recent releases 2.1.16, 2.2.7, 2.3.0 which broke jQuery for us. This references the mixins versions: magento/magento2@d588b5b
1 parent 6cd03c7 commit 2c3832a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

RequireJsLoaderPlugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ function gatherRequireJsImports(modules) {
1010
for (var module of modules) {
1111
// If the requirejs-loader was used, then we need to wrap and import this module.
1212
// TODO: Clean up this check.
13-
if (module.request && module.request.indexOf('requirejs-loader') !== -1) {
13+
if (module.request && String(module.request).indexOf('jquery.js') !== -1) {
14+
needsImport.push('mixins!' + module.rawRequest);
15+
} else if (module.request && module.request.indexOf('requirejs-loader') !== -1) {
1416
needsImport.push(module.rawRequest);
1517
}
1618
}

0 commit comments

Comments
 (0)