Styles break after the first change [in wepack 5 / yarn 2](but it works correctly if refresh page manually)
See original GitHub issueI upgraded my project to Webpack 2 / Yarn 2 and used webpack serve
instead of webpack-dev-server
to run the dev server. I configured this fast refresh package with webpack 4 before and was OK.
I have an issue with the new config, Styles break after the first change.
I recorded behavior in this GIF: http://g.recordit.co/1hY0RiTnu5.gif
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Solution for Webpack 5 Dev Server Not Live Reloading
There is currently a bug with Webpack 5 and webpack-dev-server not working that is caused by the existence of a browserslist in the...
Read more >webpack-dev-server hot reload not working - Stack Overflow
And it builds and seems like it's working. localhost:8080 shows the expected result but hot-reload does just not work. When I change a...
Read more >To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly ... in your webpack 4 configuration and check if...
Read more >Get started with Vuetify
Vue UI install. Vuetify can also be installed using Vue UI, the new visual application for Vue CLI. Ensure that you have the...
Read more >webpack Tutorial: How to Set Up webpack 5 From Scratch
This will allow modules to update without doing a complete reload of the page - so if you update some styles, just those...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi - I am pretty certain that your error has nothing to do with this plugin.
To achieve HMR with CSS during development - you will have to use
style-loader
instead ofMiniCssExtractPlugin.loader
. You could probably switch them according to Webpack’s mode. Alternatively, you can useextract-css-chunks-webpack-plugin
which basically combines the two as one plugin.Docs here: https://github.com/webpack-contrib/css-loader#extract
@mizi-lin If you have any issues related to CSS, please file issues at the corresponding loaders (e.g. style-loader, css-loader, etc.)