Skip to content

Please clarify wether HMR should work in the new version #72

Closed
@swernerx

Description

@swernerx

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?

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions