Hot reload is not working with CSS modules, starting in 3.1.0
Created by: igorstajic
Describe the bug
Hot reload is not working with CSS modules, after upgrading react-scripts to 3.1.0 or 3.1.1 It works fine with react-scripts 3.0.1
Which terms did you search for in User Guide?
CSS modules hot reload
Environment
System: OS: macOS 10.14.6 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Binaries: Node: 10.16.2 - ~/.nvm/versions/node/v10.16.2/bin/node Yarn: 1.16.0 - /usr/local/bin/yarn npm: 6.10.3 - ~/.nvm/versions/node/v10.16.2/bin/npm Browsers: Chrome: 76.0.3809.100 Firefox: 67.0.4 Safari: 12.1.2 npmPackages: react: ^16.9.0 => 16.9.0 react-dom: ^16.9.0 => 16.9.0 react-scripts: 3.1.1 => 3.1.1 npmGlobalPackages: create-react-app: Not Found
Steps to reproduce
- Create a new app with "npx create-react-app"
- Add Test.module.css file and import in in App.js
- Try editing the css module file, it will reload the whole app.
Expected behavior
Editing the css module should be hot reloaded.
Actual behavior
The whole app is reloaded when the css file is edited.