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
"Cannot read properties of undefined (reading 'getChunkConditionMap')" #15172
Comments
+1, recently I was trying to change
It happens when I have
I haven't find these reason of this, either I am not sure if we have the same, although we have Error log looks similar. |
Please create reproducible test repo |
Also report here - #2933 (comment) |
I've reproduce this issue with a different webpack configuration. Minimal reproductible test repo is available above. README explain how to trigger the issue |
@daividh @NeilTheSeal for now as workaround I think you can pass { experimentalUseImportModule: false } to |
@alexander-akait so this happens when mini-css imports module using |
@vankop ! Thanks a LOT ! |
I have the same error log with you, use swc-loader ,"Cannot read properties of undefined", loader target: "es5", when i set target "es017", it works. |
all is done from webpack side, need wait for fix in mini-css webpack-contrib/mini-css-extract-plugin#915 |
Bug report
What is the current behavior?
When using hot module replacement in Webpack 5.66.0, an error is produced "Cannot read properties of undefined (reading 'getChunkConditionMap')". I think it may have something to do with the file "types.d.ts", since that is the only location I could find with a reference to "getChunkConditionMap". My webpack.config.js is below. It is initialized with the following CLI command: "
webpack serve --open --config ./_dev/webpack.config.js --mode=development
".MY webpack.config.js FILE
If the current behavior is a bug, please provide the steps to reproduce.
To reproduce the bug, run the code above with the following dependencies (taken from package.json):
What is the expected behavior?
The expected behavior is that the bundle loads without any errors, and Hot Module Replacement successfully loads changes to CSS files without a full page reload. Note that this error does not happen with Webpack 5.65.0, however Hot Module Replacement still appears not to function correctly with 5.65.0. With the previous version, I was using the config above as well. My temporary fix is to use full reload rather than HMR for the time being.
Other relevant information:
webpack version: 5.66.0
Node.js version: 17.3.1
Operating System: Windows 10 Enterprise
Additional tools: N/A
The text was updated successfully, but these errors were encountered: