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
{{ message }}
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
When using any preprocessor, if I change a CSS file that is included via @import then HMR doesn't pick up that a file has changed. If I save the initial CSS file that was in the JS then I can see the changes in the included file.
header.css
@import"shared/core.css"; /* Changes to core.css won't be picked up until header.css is saved. */header {
/* Changes here will update via HMR as this file is included via JSX */
I have a basic project with a nested CSS file and folder structure. I have tried using PostCSS and many import plugins, as well as converting everything to SASS using node-sass. When I run fusebox for the first time, the CSS is correctly compiled. If I change a CSS file which is directly imported by the JS then HMR works as expected. If I modify a CSS file included via @import then HMR doesn't automatically update the page.
FYI This is a problem for a lot of CSS @import libraries in Webpack as well. Webpack provides the functionality for library owners to addDependencyTo to pass the files to Webpack that should be watched.
//webpack.config.jsvarpostcssImport=require('postcss-import');
...
postcss: function(webpack){return[postcssImport({addDependencyTo: webpack}),// Must be first item in listprecss,autoprefixer];},
The text was updated successfully, but these errors were encountered:
mummybot
changed the title
HMR isn't triggered when changing a CSS files included via @import
HMR isn't triggered when changing CSS files included via @import
Aug 12, 2017
When using any preprocessor, if I change a CSS file that is included via
@import
then HMR doesn't pick up that a file has changed. If I save the initial CSS file that was in the JS then I can see the changes in the included file.header.css
I have a basic project with a nested CSS file and folder structure. I have tried using PostCSS and many import plugins, as well as converting everything to SASS using node-sass. When I run fusebox for the first time, the CSS is correctly compiled. If I change a CSS file which is directly imported by the JS then HMR works as expected. If I modify a CSS file included via
@import
then HMR doesn't automatically update the page.FYI This is a problem for a lot of CSS
@import
libraries in Webpack as well. Webpack provides the functionality for library owners toaddDependencyTo
to pass the files to Webpack that should be watched.webpack-contrib/postcss-loader#8
postcss/postcss-import#233
The text was updated successfully, but these errors were encountered: