-
Notifications
You must be signed in to change notification settings - Fork 512
refactor: cache assets similar to how the normal compilation does it #325
refactor: cache assets similar to how the normal compilation does it #325
Conversation
Codecov Report
@@ Coverage Diff @@
## master #325 +/- ##
=========================================
- Coverage 90.14% 90.1% -0.04%
=========================================
Files 4 4
Lines 355 364 +9
Branches 75 78 +3
=========================================
+ Hits 320 328 +8
- Misses 35 36 +1
Continue to review full report at Codecov.
|
@d3viant0ne Any thoughts on this? Post final merge? |
664e78c
to
76a171d
Compare
@uncleyo Please close and reopen the PR to trigger the CLA Bot again, sign the CLA and rebase against current master 😛 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general rule of thumb, if i'm adding a conditional check to trigger some sort of feature that is a place where I need to add a test.
Watch related or not, this should be testable and imo should not merge without one.
Previously extract-text-webpack-plugin emitted css assets every time anything else changed. Injected assets were also not included in compilation hash calculation and caused some rebuilds to be hidden.
I've rebased this PR just to refresh it to latest master. I Don't think it should be merged. For anyone interested, I've been using this plugin https://gist.github.com/uncleyo/106c3cb407bf5dd38ebd6be0710afd4a as a workaround for a while now. If anyone else is missing this feature, feel free to use it. I don't like the code in this PR here myself, honestly, as I believe this is something webpack should handle automatically., either by exposing something like compilation.addAsset() or with plugin, something like the one in my gist. I'll not close the PR just yet, hoping to hear some comments |
@uncleyo Would you be interested in make the gist into a plugin |
We are getting close to a new major release and therefore I will close this for now, feel free to open a new PR with these changes, when #540 landed on master, but as you commented this maybe better solved at core level in general 😛. Thx |
Previously
extract-text-webpack-plugin
emitted css assets every time anything else changed.Injected assets were also not included in compilation hash calculation and caused some rebuilds to be hidden.
There are no tests included in this PR, since this is watch-related and tests will go in a separate PR in the main repo that has great facilities for that.
This continues fixes started with webpack/webpack#3737 and webpack/webpack#3744 and should hopefully address a lot of watch related issues with
extract-text-webpack-plugin
.