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

Client reloads app even when there is an error and the screen is just shown for a very short time. #209

Closed
jespermjonsson opened this issue Jul 8, 2015 · 3 comments

Comments

@jespermjonsson
Copy link

When loading the application with the live client e.g. http://localhost:3000/webpack-dev-server/index.html the browser is reloaded on script/style changes. But when there is an syntax error (and using the NoErrorsPlugin) the browser is reloaded with the message: Errors while compiling. App ready. And an error screen is displayed just before the browser is reloaded. But if the browser is reloaded manually after this syntax error has occured (so it is the initial load) the error screen is displayed nicely with the title: Errors while compiling. App updated with errors. No reload!.

Is there a reason why the client reloads the browser on errors? Thinking of these lines in the client:

if(initial) return initial = false;
reloadApp();

Or are you open to change this somehow so the error message is shown until the syntax error is fixed and a new bundle is generated even when the error occurs during a regular reload (not just the initial load)?

@SpaceK33z
Copy link
Member

More then one year later, I fixed this in the prevent-reload-on-errors branch ⏳ .

I simply removed the code that did a reload when there were warnings or errors. I still want to look at it if there are valid use cases for this. At the moment I can't think of any.

@SpaceK33z SpaceK33z added this to the Version 2 milestone Oct 31, 2016
@SpaceK33z
Copy link
Member

Looks like this code was introduced in the first version of the "inline" modus (2329516). After some tests it seems safe to remove.

@kozakl
Copy link

kozakl commented Apr 14, 2018

Hello, I use react + typescript and when I for example load module without dt.ts definition file I see error in console and reload is prevented...
So reloading app when compiler see errors should be optional because IT'S errors usually are not dangerous, but stopping hot reload is really uncomfortable...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants