question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jquery 2.2.1 breaks webpack builds when loading individual modules

See original GitHub issue

Hi,

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:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

11reactions
timmywilcommented, May 11, 2016

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.

0reactions
jvreekencommented, May 11, 2016

same problem here, ERROR in ./~/jquery/src/selector-sizzle.js Module not found: Error: Cannot resolve ‘file’ or ‘directory’ …/external/sizzle/dist/sizzle

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found