postcss-modules
postcss-modules copied to clipboard
Changes to composed modules do not trigger hot reloading in webpack
I have a webpack setup using postcss-modules.
I have some.css containing .hi { composes: red from './base.css';}, and base.css containing .red {color: red}.
If I make a change to some.css in development, the changes immediately appear on page. However, if I change base.css, the changes don't appear unless I also touch some.css or reload.
I think postcss-modules needs to report the dependency between the files so that webpack will detect that changes should trigger an update.
Were you able to figure out why this was happening ? any workarounds?
I am observing the same behaviour: Any other change to css results in HMR, but any changes in composes do not trigger HMR. I am not sure if it is due to postcss-modules or css-modules in general
No, I just avoid using it for now.