jquery 2.2.1 breaks webpack builds when loading individual modules
See original GitHub issueHi,
after this change https://github.com/jquery/jquery/commit/5943f1d7ffef41cc1a99bffe189f6d111fbccfd0 webpack builds are broken when loading individual modules:
ERROR in ./~/jquery/src/selector-sizzle.js Module not found: Error: Cannot resolve 'file' or 'directory' ../external/sizzle/dist/sizzle in /Users/berto/Temp/webpack-jquery/node_modules/jquery/src @ ./~/jquery/src/selector-sizzle.js 1:0-14:3
I think this is happening because in 2.2.1 ‘selector-sizzle.js’ is trying to load the sizzle dependency as ‘…/external/sizzle/dist/sizzle’ a file which does not exist, unlike in 2.2.0 (for instance) which loads ‘sizzle’.
I set up a simple example here: https://github.com/bertez/webpack-jquery
npm install
npm run build
Thank you very much in advance.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:19 (9 by maintainers)
Top Results From Across the Web
jquery - $ is an empty object when bundled using webpack-2
Recently, I have been thinking of moving our build process from Grunt to webpack-2 . Our code is entirely written in AMD format...
Read more >Code Splitting - webpack
It can be used to achieve smaller bundles and control resource load prioritization ... Dynamic Imports: Split code via inline function calls within...
Read more >How to upgrade to the latest version of jQuery
Continue loading jQuery from the head, this will result in slower web page performance but you'll be done upgrading to the latest jQuery....
Read more >Webpack: How to avoid multiple versions of jQuery
To avoid multiple versions of a package, you can manually maintain a resolutions section in your package.json . We recommend you to do...
Read more >Minifying - SurviveJS
Since webpack 4, the production output gets minified using terser by default. ... Angular 1 expects specific function parameter naming when using modules....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We will have a fix in the next patch. Please use GitHub’s reaction feature on the original post if you’re having the same issue.
same problem here, ERROR in ./~/jquery/src/selector-sizzle.js Module not found: Error: Cannot resolve ‘file’ or ‘directory’ …/external/sizzle/dist/sizzle