Answer the question
In order to leave comments, you need to log in
Code splitting in Webpack 5?
Good evening, I encountered such a problem that when migrating from the 4th webpack to the 5th, code splitting breaks.
I can't understand why the 5th webpack divides the chunks so that jquery goes into each chunk, and not into common.js (a common file for all pages).
This is the script built by webpack 4:
Here's what webpack 5 built:
It would make sense to put jquery in common.js, but webpack 5 doesn't think so. Here is the build code:
Can this behavior be fixed?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question