-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.4.0-beta.1] Changes to exported variables are not picked up when using webpack hmr #528
Comments
cc @Anber |
@bartels thank you for the report and sample repo! I'll take a look in a couple of days. |
I found that if you link the 🚫 Bug reproduction:
Through the Firefox DevTools, I could see the DOM tree flashing briefly; it seemed like some update had been executed, although it had no effect on the style. I thought it had relation a with #537, but I've hard-removed the ✔️ Workaround
Changes I made to |
Hey @Anber, any progress on this one by any chance? 😊 I've been getting a lot of reports from my team that this is happening regularly. |
@Hemlok Unfortunately, not really, but it's time to change it. |
Probably, fixed in |
Hey this solved it! Thanks so much @Anber 🙇 |
Environment
1.4.0-beta.1
Description
When using webpack hmr (or webpack
--watch
flag), changes to variables exported from an external module are not picked up by linaria.For example, defining color values in a
colors.js
module and importing those variables in a linaria styled component, the css output by linaria is not updated when that module is changed. Only after killing the webpack build/devServer and restarting will linaria pick up the style changes.I checked in
.linaria-cache
folder and noticed the styles are not updated there.Reproducible Demo
Here's a github repo to demo the problem: https://github.com/bartels/linaria-1.4.0-beta.1-hmr-bug
The text was updated successfully, but these errors were encountered: