webpack / webpack-dev-middleware

A development middleware for webpack
MIT License
2.5k stars 377 forks source link

feat: added the `cacheImmutable` option to cache immutable assets (as… #1924

Closed alexander-akait closed 1 month ago

alexander-akait commented 1 month ago

…sets with a hash in file name like image.e12ab567.jpg)

This PR contains a:

Motivation / Use-Case

Allow to cache immutable assets (webpack store immutable flag in assets info).

Breaking Changes

No

Additional Info

Will be great to enable it by default in the next major release.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 36.00000% with 16 lines in your changes missing coverage. Please review.

Project coverage is 58.25%. Comparing base (f7529c3) to head (c4f9e51). Report is 2 commits behind head on master.

Files Patch % Lines
src/middleware.js 23.80% 11 Missing and 5 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1924 +/- ## ========================================== - Coverage 60.09% 58.25% -1.84% ========================================== Files 13 13 Lines 857 860 +3 Branches 244 247 +3 ========================================== - Hits 515 501 -14 - Misses 284 296 +12 - Partials 58 63 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.