-
-
Notifications
You must be signed in to change notification settings - Fork 384
"installedCssChunks is not defined" after 2.9.0 update #1110
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
Comments
Please create reproducible test repo, otherwise I can't help, thank you |
We are also seeing the issue, in watch mode only and only on certain usage patterns of split bundles. We will try and help with more info by debugging within a few weeks unless someone beats us to it. |
Thanks, that would be super helpful. We're in a large private monorepo, and it'll be a bit before I can try and create a public repro to share. |
Yeah, I am glad to help with it, but wihtour more information, it is hard, it happends only in 2.9.0? |
I appreciate it. Yes, we were on 2.8.1 for a while without issue. This only started happening after updating to 2.9, and I believe it's related to that change I linked specifically. |
I think it can be due it - ee25e51, do you have |
Looks like |
For sure, I can debug it locally. I'll have to set that branch back up, but that won't take a long. |
We aren't doing any prefetching ourselves, but from what I can tell, this seems to always be breaking on a chunk that's coming from a library we're using that's calling The library in question is just passing the import function into |
@michaelfaith Maybe you can try to create reproducible test repo with this library, look like you have CSS chunks before, but then it was removed for bundle, but runtime code already was created |
I am running into this issue as well, in an Angular 18 app. mini-css version is 2.9.0. If I change all three instances of the I'll try to provide a minimal repro if I can. EDIT: no luck with a fresh webpack-based Angular 18 app. |
@Plonq Where do you change |
If someone gives me the code that causes this problem, then I will be able to fix it, logically this cannot happen at all |
If you have no instances of import(
/* webpackPrefetch: true */
"some-file.js"
); EDIT: I misunderstood, I thought you were someone with the same error. Here's some real code from one place we use that: import(
/* webpackChunkName: "emoji-data" */
/* webpackPrefetch: true */
"../../emojis.data"
).then(({ EMOJIS }) => {
this.emojiCategories = EMOJIS;
}); Before upgrading to Angular 18 (which I presume updaed mini-css as a dep), this should have pre-fetched the emoji data before this code executed. Now with Angular 18, the prefetch doesn't happen (as if the prefetch magic comment wasn't there) and the error occurs. In both cases the import still works though. I wasn't able to create a minimal repro yet - I attempted to recreate this using a fresh Angular 18 project with the webpack builder, but couldn't reproduce the error. I have plans to attempt from the other side - strip down my actual project as much as possible, but I haven't found the time yet. |
@Plonq Can you run Also can you put here - https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/src/index.js#L904
and show me values? It is necessary to understand why the prefetch generated, but the generation of runtime for chunks does not occur, very weird. |
I was able to reproduce |
v2.9.2 seems to fix it. FWIW, I had to override the version like so: "overrides": {
"@angular-devkit/build-angular": {
"mini-css-extract-plugin": "2.9.2"
}
} NPM LS:
|
That's weird, has this ever worked before? Maybe you can recreate the structure? |
Thanks so much for sticking with this issue, even though I wasn't able to put together a repo. Really appreciate it. |
Echoing michael, appreciate the responsiveness! |
After upgrading from 2.8.1 to 2.9.0 (and then 2.9.1), we're seeing this error repeatedly in the Chrome dev console. We didn't change any aspect of our config or css loading set-up.
I believe this is related to this change: #1043
Plugin config
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: