-
Notifications
You must be signed in to change notification settings - Fork 85
ExtractCSS rule breaks HMR and SourceMaps #161
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
Upgrade to latest? This was fixed in 4.1 |
@ScriptedAlchemy Still does not work according to nuxt/nuxt#5390 (comment) |
Yes, I explicitly tried it with v.2.4.0 before logging this bug |
Should be resolved. |
@ScriptedAlchemy has the fix already been released? 🤔 |
@ScriptedAlchemy @manniL I tried it with Nuxt 2.6.1 and extract-css-chunks-webpack-plugin 4.3.0, but still, when I specify extractCSS: true, I get files extracted in Dev mode as if I were running Production build http://take.ms/5fySF thus hot reload is not working as well as sourcemaps are pointing to those extracted files instead of pointing to Vue files. |
try it with |
@ScriptedAlchemy CodeSandbox is here: https://codesandbox.io/s/w08yyp72zk |
Any luck with this? Seems the case with razzle builds too on dev. |
Not really sure what I'm looking at or how to use a code sandbox. If i can get a real repo then i might be able to look into the problem. TBH it would be great if there was some debugging done on this. I'll likely not fix this till it becomes a problem for me - too many larger projects on the go right now and not enough time to debug the code. Find me the line and ill write the fix. Alternatively, can you roll back to like version 2 or 3? |
Reproduction linkhttps://github.com/manniL/nuxt-extractcss-breaks-hmr-in-dev/tree/master/ ( credits to @AndrewBogdanovTSS ) Steps to reproduce
What is expected ?
What is actually happening?
Sad to hear that this issue has low priority as it defeats a large benefit that this plugin brings compared to mini-css-extract-plugin, which is HMR. IMO this is at least medium priority. (I totally understand that you have other projects to manage and don't want to say that you have to dedicate time or similar, don't get me wrong there If you tell me how to debug the issue I'm happy to invest time but I'm fairly new to webpack plugins 🙈 |
any news on this issue? |
@manniL for the record, we have merged with mini-css I maintain both codebases now. Also, are you using CSS modules or standardized CSS files? (do you use |
I've disabled the plugin in dev because of this. Please prioritize! :) |
Okay okay. I’ll take another look at the repo links |
When it will be fixed ? i need to press F5 at each change in my styl files ... :'( |
@ScriptedAlchemy Thanks for the update and for taking another look! We add the plugin here https://github.com/nuxt/nuxt.js/blob/ab72355669243c128c9eadc41503a8d6520b928c/packages/webpack/src/config/base.js#L364-L368 and the loader here https://github.com/nuxt/nuxt.js/blob/840ccb4bdfa3751217a7b41726b3e8f11db229bb/packages/webpack/src/utils/style-loader.js#L85-L95 We use |
You need to use reloadAll and hot:true Hot:true enables HMR, reloadAll is a additional step as some users struggle to get HMR to work in all scenarios |
|
@ScriptedAlchemy Thanks! This worked well |
Booya 🔥 my work here is done ✅ Tag me if there’s any further assistance needed. I’ll likely run another update to fix some possible load order issues. (Next week) There’s a bug if you try to hmr base64 link tags that also is being addressed:) |
Reproduction link
https://codesandbox.io/s/w08yyp72zk
How to reproduce
Try to change the color of the title without a page refresh
Expected behavior
Actual behavior
Related issues
nuxt/nuxt#5390
The text was updated successfully, but these errors were encountered: