Skip to content

Cannot handle css-loader error #334

Description

@AndreasCag
  • Operating System: MacOS High Sierra 10.13.6
  • Node Version: 9.7.1
  • NPM Version: 6.0.1
  • webpack Version: 4.19.1
  • webpack-hot-middleware Version: 2.24.0

Description

I use css-loader with enabled modules option.
When I add any new css rule css-loader throw error:

Error: Aborting CSS HMR due to changed css-modules locals.

In that case I want to reload page, but webpack-hot-widdleware ignores any errors and I'm not able to handle errors and reload page.

Reproduction

https://github.com/AndreasCag/hot-reload-bug-repro

How Do We Reproduce?

  1. Download repro
  2. Install dependencies npm i
  3. Run dev server npm run dev
  4. Open browser with url localhost:3000
  5. Open browser console
  6. Go to file ./src/test.css and add the following rule at the end of file
.test-3 {
    font-size: 33px;
}
  1. Go to browser and check out console

Actual behaviour

image

Expected behaviour

Page automatically reloaded

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions