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.

Please clarify wether HMR should work in the new version

See original GitHub issue

I just want to figure out wether HMR should work with the newest version. I am using the newest version of both this plugin and webpack. It seems that CSS changes are correctly triggering HMR, but in the end nothing happens. This is the client-side log output:

「hot」 App updated. Recompiling src/components/card/Card.module.css
log.js:48 「hot」 webpack: Compiling (<unnamed compiler>)
log.js:48 「hot」 App Updated, Reloading Modules
log.js:48 「hot」 Checking for updates to the bundle.
log.js:48 「hot」 No Modules Updated.
log.js:48 「hot」 App is up to date.

Re-loading the app manually works fine though.

This is my loader config for CSS files:

{
  test: /\.module\.(css|sss|pcss)$/,
  use: [
    extractCssLoader,
    "cache-loader",
    "thread-loader",
    {
      loader: "css-loader",
      options: {
        import: false,
        minimize: false,
        sourceMap: true
      }
    },
    {
      loader: "postcss-loader",
      options:{
        sourceMap: true
      }
    }
  ]
}

Any hints? Previously with mini-css-extract-plugin I used the style-loader during development. Is this also the way to go with this plugin?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:29 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
ScriptedAlchemycommented, Jun 5, 2018

@swernerx

Let me know fi this helps, im at work otherwise id dedicate full time to fix it. if you still have issues.

What I had was a conditional checking the the process.env.NODE_ENV === development

secondly I have a function that determines is you use HMR

However id either are false. it won’t add. For the time being you can just add hot:true to the plugin Ill leave that there but will also look at your specific plugin at check if I can automate the test as well

Might appreciate the patience

1reaction
ScriptedAlchemycommented, Jun 5, 2018

No I fully understand! Give me a second and ill release a @next on npm which should resolve your issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why You Should Ask “Could You Please Clarify…?” Instead of ...
But if you only need a small detail explained to you, choose the verb “clarify” instead. Learning to clarify what you heard and...
Read more >
How to Ask for Clarification - VOA Learning English
After you express your lack of understanding, the next step is to ask the person to clarify what they have said. Here are...
Read more >
10 Ways to Politely Ask for Clarification in English - Engoo
This post covers 10 popular expressions native English speakers use to politely ask for clarification.
Read more >
5 Polite Phrases to Use When Asking For Clarification
Do you feel embarrassed when asking for clarification? Just use one of these simple and polite phrases, and you'll avoid misunderstandings.
Read more >
20 Email Expressions to Ask for Clarification - Tannia Suarez
Use the expressions below to address these potentially problematic situations smoothly and professionally. If I understood you correctly, you ...
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