0.6.0 reloading stylesheets is not working anymore
See original GitHub issueHey, took me a while to figure out what was causing this.
I have the following stack
- next@8.0.3
- @zeit/next-sass@1.0.1
The following config:
const sass = require('@zeit/next-sass');
[sass, {
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: '[local]___[hash:base64:5]',
},
}]
The Problem The project is reporting in the chrome console (and this is normal and hasn’t caused any issues before)
Conflicting order between:
- css ./node_modules/css-loader??ref–10-3!./node_modules/postcss-loader/src??ref–10-4!./node_modules/sass-loader/lib/loader.js??ref–10-5!./src/components/container/Container.scss
- css ./node_modules/css-loader??ref–10-3!./node_modules/postcss-loader/src??ref–10-4!./node_modules/sass-loader/lib/loader.js??ref–10-5!./src/components/card/Card.scss
BUT
- When changing route
- Most of the components on the new page will be unstyled unless I hard-reload the page.
Looks like the styles are not injected into the head
Solution
When I downgraded to 0.5.0 I get the same flash of some unstyled components on route change and the following message from webpack:
[HMR] Reloading stylesheets…
Following by a correct CSS render.
I will attempt to make a repro with vanilla webpack setup, but until then, this issue can serve as a placeholder.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
module.hot.dispose event not being called · Issue #11 - GitHub
I have an issue with Next.JS + css modules. Somehow, with css modules, the module.hot.dispose callback is not being fired. I am fixing...
Read more >CSS file not refreshing in browser - Stack Overflow
Try opening the style sheet itself (by entering its address into the browser's address bar) and pressing F5 . If it still doesn't...
Read more >Livereload not working anymore - Help - Jekyll Talk
It claims LiveReload address: http://0.0.0.0:35729 after the serve command, but I see no reload script injection in my header files.
Read more >Changelog | Meteor API Docs
dbCursor.operation is not an option anymore in the raw cursor from nodejs mongodb driver. If you want to access the options, use synchronousCursor.dbCursor....
Read more >browser-sync - npm
Live CSS Reload & Browser Syncing. ... Start using browser-sync in your project by running `npm i ... No problem, here's a setup...
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 Free
Top 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
Awesome, I’ve got an event this evening but will dig into the problem this weekend
Thanks, For the ping! Will set a reminder to check this