Chunksplitting leads to Cannot read property 'call' of undefined
See original GitHub issueBug report
What is the current behavior? When chunksplitting with the default setup as described here https://webpack.js.org/plugins/split-chunks-plugin/#optimizationsplitchunks, splitting chunks leads to the original chunk to only include one module and that modules moduleId is the path instead of the number that is used in the runtime code to require this module. The right chunk is loaded but the webpack_modules only includes the path instead of the module id(eg 1880) and leads to Cannot read property ‘call’ of undefined. The mode is set to none.
If the current behavior is a bug, please provide the steps to reproduce. It is tough to reproduce since this is a chunksplitting done with the standard chunksplitting settings. Maybe due to the knowledge of @sokra this could be fixed, because maybe this is a very specific issue and he knows where to look exactly?
What is the expected behavior? That the module id is included in the chunk instead of the path to the module. Then the webpack_require should also work correctly. This seems to be a very specific issue and maybe this can be fixed swiftly by one who knows the code around this area.
Other relevant information: webpack version: 5.16.0 Node.js version: 12.17.0 Operating System: macOS Additional tools:
Issue Analytics
- State:
- Created 3 years ago
- Comments:35 (32 by maintainers)
Top GitHub Comments
Production build Upgrading from “webpack”: “^5.22.0”, to “webpack”: “^5.23.0” and all versions above I get
not using anything “special”
@alexander-akait also when I set the moduleIds: false, I get possible oom node js errors/breakpoints in the nodejs devtools in the RuntimeTemplate within the function noModuleIdErrorMessage. If this build doesn’t work again, I will reset it to 'natural’or just leave it out of the config as previously done.