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

When the application has errors HMR slows down more and more #1013

Open
vallemar opened this issue Dec 6, 2022 · 2 comments
Open

When the application has errors HMR slows down more and more #1013

vallemar opened this issue Dec 6, 2022 · 2 comments
Labels
V3 Issues related to V3

Comments

@vallemar
Copy link
Contributor

vallemar commented Dec 6, 2022

The HMR works perfectly until you have errors in the code, when the application fails and when making a new change it starts again the HMR starts to work slower and slower until it is better to stop and start again. (vue 3)

@rigor789 rigor789 added the V3 Issues related to V3 label Dec 6, 2022
@vallemar
Copy link
Contributor Author

vallemar commented Dec 7, 2022

An easy way to replicate this problem is to add 2 times the class property to an element. Even now when I add 2 times this gets stuck and at the end it says that it has been updated but the changes no longer appear in the app. Example:

      <GridLayout
          class="asdf"
          class="rounded-full mx-2"></GridLayout>

It seems silly, but when you have many properties in an element, at least it usually happens to me

@rigor789
Copy link
Member

Setting config.optimization.noEmitOnErrors(true); should make this better:

webpack.chainWebpack(config => {
  config.optimization.noEmitOnErrors(true);
})

This makes sure webpack doesn't emit any files when there are any compilation errors. This is not ideal in all cases, since you might still want to run the app when you have some small TS errors while developing/debugging.

Will be making a change to @nativescript/webpack to always emit the updated hash even if there are compilation errors, since in those cases currently the HMR hash chain is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 Issues related to V3
Development

No branches or pull requests

2 participants