Skip to content

Commit f64d4d1

Browse files
author
Gil Greenberg
authored
If module is jquery, prefix with mixins
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 2c3832a commit f64d4d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ module.exports.pitch = function(remainingRequest) {
1111

1212
// Route through window.require.
1313
// TODO: We use rawRequest to grab the original request (including text! or etc.)
14-
const jsonName = JSON.stringify(this._module.rawRequest);
14+
const prefix = (this._module.rawRequest == 'jquery') ? 'mixins!' : '';
15+
const jsonName = JSON.stringify(prefix + this._module.rawRequest);
1516
return `module.exports = window.require(${jsonName});`;
1617
};
1718

0 commit comments

Comments
 (0)