You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSS Hot Module Replacing is refreshing the whole app when using Sass modules with Sass functions.
I don't know if this is related to webpack, node-sass or sass-loader, but it seems weird because we have 2 projects that use the same config, one using a custom getIn function to get colors from a Sass map and other doesn't. The first one refreshes all app when a Sass file is modified and the other one doesn't.
Write a custom Sass function and import and use it in others module.scss files.
Modify any module.scss file.
Expected behavior
Css should update without refreshing the whole app.
Actual behavior
Whole app gets compiled and refreshed
Reproducible demo
Since create react app base project is really thin it doesn't provide much insight because compiling and refreshing is too fast. Although you can add the function i'm using and a map and use that function in some .module.scss file and then change another file, this will cause to refresh the whole app and not replace the css with HMR as it should.
Describe the bug
CSS Hot Module Replacing is refreshing the whole app when using Sass modules with Sass functions.
I don't know if this is related to webpack, node-sass or sass-loader, but it seems weird because we have 2 projects that use the same config, one using a custom getIn function to get colors from a Sass map and other doesn't. The first one refreshes all app when a Sass file is modified and the other one doesn't.
Did you try recovering your dependencies?
Yes.
Which terms did you search for in User Guide?
Sass, hot, hot reloading, refresh, sass function
Environment
Steps to reproduce
Expected behavior
Css should update without refreshing the whole app.
Actual behavior
Whole app gets compiled and refreshed
Reproducible demo
Since create react app base project is really thin it doesn't provide much insight because compiling and refreshing is too fast. Although you can add the function i'm using and a map and use that function in some .module.scss file and then change another file, this will cause to refresh the whole app and not replace the css with HMR as it should.
Thanks for the help!
The text was updated successfully, but these errors were encountered: