Skip to content
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

webpack hot reload fails after compile error #762

Closed
bbenezech opened this issue May 27, 2021 · 1 comment
Closed

webpack hot reload fails after compile error #762

bbenezech opened this issue May 27, 2021 · 1 comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: performance 🚀 Issue is related to performance needs: complete repro 🖥️ Issue need to have complete repro provided platform: ssr 🛠️ Issue related to SSR

Comments

@bbenezech
Copy link

bbenezech commented May 27, 2021

Hi, I found a pretty bad bug that messes up the webpack hot reload.

It would mean a lot to me if you could have a look, I tried to make things as easy as possible:

Reproduction

https://github.com/bbenezech/repro-linaria-bug

git clone git@github.com:bbenezech/repro-linaria-bug.git
cd repro-linaria-bug
yarn; yarn start
  • open src/Other.jsx
  • change the first <span> to <spa> (make a typo that breaks webpack compilation)
  • the build now won't refresh if you try to fix the typo or try any other change in src/Other.jsx. The file is "frozen"

Important points

  • you must either restart the server to fix the server, or modify another file (src/index.jsx for ex.)
  • reloading the page won't help
  • won't trigger if you copy the Other component definition in index.jsx
  • won't trigger if you remove the const StyledOther = styled(Other) in src/index.jsx and use the Other component directly
  • happens on compile errors, not runtime errors
  • happens with webpack 4 and 5
  • happens on linaria 2 and 3

Thank you for your time! Please tell me if I can be of any assistance.

@bbenezech bbenezech added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels May 27, 2021
@github-actions github-actions bot added bundler: webpack 📦 Issue is related to webpack bundler platform: ssr 🛠️ Issue related to SSR cat: performance 🚀 Issue is related to performance and removed needs: triage 🏷 Issue needs to be checked and prioritized labels May 27, 2021
@Anber
Copy link
Collaborator

Anber commented Jun 6, 2021

Hi @bbenezech,
Thank you for your report!

In case of an error, webpack loaders didn't mark Other.jsx as a dependency of index.jsx.

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: performance 🚀 Issue is related to performance needs: complete repro 🖥️ Issue need to have complete repro provided platform: ssr 🛠️ Issue related to SSR
Projects
None yet
Development

No branches or pull requests

2 participants