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

Error relating to BTR during watch mode #244

Closed
JamesLMilner opened this issue Feb 13, 2019 · 1 comment
Closed

Error relating to BTR during watch mode #244

JamesLMilner opened this issue Feb 13, 2019 · 1 comment
Assignees

Comments

@JamesLMilner
Copy link
Contributor

Bug

screenshot_20190208_204450

Package Version: 5.0.1-pre

Expected behavior:

Watch mode does not crash

Actual behavior:

Watch mode will crash with the error above

@agubler
Copy link
Member

agubler commented Feb 13, 2019

This seems to be because the manifest plugin that is used, keeps a counter that is incremented when webpack runs and decremented when webpack emits. Before adding the manifest.json to the compilation.assets the plugin checks that the counter is equal to 0, i.e. webpack has been run and emitted an equal number of times.

In serve mode the NoEmitOnErrorsPlugin is used which during an error build stops webpack from running the emit phase, this leaves the counter at a non zero number - meaning that every subsequent build will skip adding the manifest.json to the assets as the counter is greater 0.

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

No branches or pull requests

2 participants