matvp91 / stylemug

CSS in JS with support for static / atomic CSS extraction.
MIT License
54 stars 2 forks source link

HMR clears cache for global styles. #11

Closed matvp91 closed 4 years ago

matvp91 commented 4 years ago

To Reproduce Steps to reproduce the behavior:

  1. Run the example in the repo
  2. Make a change to a stylesheet
  3. globalStyles.container is no longer properly bundled

Additional context The reason is that we flush cache. We probably need a better way to preserve styles in the cache that do not change and must not be cleared from cache during a HMR reload. It could be that this bug is bigger than merely global styles, yet to figure out.