-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__webpack_require__(null)
when using manual splitChunks, concatenateModules
#11856
Comments
__webpack_require__(null)
when using manual splitChunks, moduleConcatenation__webpack_require__(null)
when using manual splitChunks, concatenateModules
|
Hmm yes that really sounds related to that. To me it sounds like a bug in the module concatenation, especially the algorithm that selects which modules are concatenated. Probably related to the runtime filtering. I have one idea which I can try to figure out how to reproduce it (note to myself: entry A -> c -> d, entry B -> d, c and d force to chunk, c + d concatenated, maybe c -> d conditional). |
Ok I found something. Looks really like your issue. I'm pretty sure #11861 fixes your issue, but it would be great if you could test it in your codebase.
|
Yes, just tested and this issue is fixed in the branch. |
same issue here with Update: it turns out from webpack/webpack.js.org#4837 the solution is to just remove |
I've just migrated our project from webpack 4 to webpack 5 and also experience this issue. Referenced
Removing |
Bug report
What is the current behavior?
This might be closely related to #11770.
obviously moduleId null does not work... This module is one that is extracted into a common chunk as part of concatenated module with some ID like 784404 - an ID that is not referenced anywhere at all.
If the current behavior is a bug, please provide the steps to reproduce.
Reproduces in our huge monorepo, so far no luck in creating a small reproduction. Even in our repo, building just the parts affected do not reproduce it, only building everything (~40 entries) produces the error.
Some notes:
devTool: false
.innerGraph: false
does not affect the issue.concatenateModules: false
"fixes" the issueusedExports: "global"
also "fixes" the issueWhat is the expected behavior?
Correctly generated chunks with no missing modules.
Btw,
moduleId: null
if it does happen, should perhaps throw during build since it will never work at runtime.Other relevant information:
webpack version: 5.3.0
Node.js version: 12.13.1
Operating System: any
Additional tools:
The text was updated successfully, but these errors were encountered: