question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.6.0 reloading stylesheets is not working anymore

See original GitHub issue

Hey, took me a while to figure out what was causing this.

I have the following stack

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

  1. When changing route
  2. 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:closed
  • Created 4 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
ScriptedAlchemycommented, Apr 12, 2019

Awesome, I’ve got an event this evening but will dig into the problem this weekend

1reaction
ScriptedAlchemycommented, Jun 11, 2019

Thanks, For the ping! Will set a reminder to check this

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found