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
Fix asset cache with "extract-text-webpack-plugin" #3806
Conversation
Add two tests asserting watch cache behavior (with and without the plugin). The lack of extra asset caching causes webpack to emit css files on every change (and report build taking place with noop JS changes). Add support for skipping watch test steps when no build is expected.
Now that "extract-text-webpack-plugin" correctly adds asset hashes to compilation hash, this can be removed. I'm actually not sure whether it makes sense to keep it (not aware of any other plugins affected by this), But I'd remove it at least for now, because of how extract-text-webpack-plugin works today. Child compilation is only added if css changes, which breaks test case watchCases/plugins/extract-text-plugin step 3 (no-op JS change) on Windows and Linux. It works on macOS though, but only as a result of another bug: watchpack reports all files as changed on that platform.
I'd need some help or advice resolving the "chicken and egg" problem between this and webpack-contrib/extract-text-webpack-plugin#325: Tests added in this PR won't work unless |
Excuse: beautify-lint does not match file patterns with forward slash on Windows
Hi @sokra, |
@sokra Please review the following output log for errors:
See complete report here. |
What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
yes
If relevant, link to documentation update:
Summary
This is related to a fix in webpack-contrib/extract-text-webpack-plugin#325, adds test to changes made in that PR and will fix #3744 in a more reliable manner.
Does this PR introduce a breaking change?
no
Other information
Add two tests asserting watch cache behavior (with and without the plugin).
The lack of extra asset caching causes webpack to emit css files on every change (and report build taking place with noop JS changes).
Add support for skipping watch test steps when no build is expected.
Revert actual change from #3744
Now that "extract-text-webpack-plugin" correctly adds asset hashes to compilation hash, this can be removed.
I'm actually not sure whether it makes sense to keep it (not aware of any other plugins affected by this),
But I'd remove it at least for now, because of how
extract-text-webpack-plugin
works today.Child compilation is only added if css changes, which breaks test case watchCases/plugins/extract-text-plugin step 3 (no-op JS change) on Windows and Linux.
It works on macOS though, but only as a result of another bug: watchpack reports all files as changed on that platform.