Open MathiasBoisgardDev opened 6 months ago
Hi, unfortunately I'm a bit occupied so I will try to take a look next week. I have a strong suspicion this is related to the use of CSS Modules (I'm not sure how creating a new class would change the output module in JS), but it could also be how style-loader
interacts with HMR under the hood.
Hello everyone,
I'll try to make a reproduction available when I have a bit of time if necessary, but first I wanted to make sure this was not a normal behaviour and/or if I'm missing something. (it concerns a corporation codebase which I can't really give access to)
So, first things first, We're using the last version of react-refresh-webpack-plugin (0.5.13) We recently started using the scss module approach and we did not have any problem prior to that
Issue: When we CREATE a new class in a styles.module.scss file, the application completely reloads. Whenever we just edit an existing class, the application fast reloads as expected.
I'm wondering if it is a normal behaviour or if something is off in our project configuration.
ps: I'm not even sure I'm asking the question in the right place, but I'm pretty sure it is :)
As you can see below, we have two different scss tests which differentiate "clasic" css/scss and another for the module.scss
webpack configuration
small example :
syles.module.scss
If I just add a
padding-right
in.test
, the application fast reloads and the new style is correctly appliedWhereas if I create a new class
The application will entirely reloads creating the new hash for
test__header