cache-loader icon indicating copy to clipboard operation
cache-loader copied to clipboard

add `cacheAddedFiles` option

Open mochiya98 opened this issue 5 years ago • 5 comments

This PR contains a:

  • [x] bugfix
  • [x] new feature
  • [ ] code refactor
  • [x] test update
  • [ ] typo fix
  • [ ] metadata update

Motivation / Use-Case

Add option to allow cache the added files. This fixes #99. It also includes small improvements.

Breaking Changes

None.

Additional Info

Old cache files will be unavailable.

mochiya98 avatar Jul 28 '20 21:07 mochiya98

Codecov Report

Merging #109 into master will increase coverage by 2.33%. The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
+ Coverage   83.09%   85.43%   +2.33%     
==========================================
  Files           2        2              
  Lines         142      151       +9     
  Branches       21       21              
==========================================
+ Hits          118      129      +11     
+ Misses         24       22       -2     
Impacted Files Coverage Δ
src/index.js 85.33% <95.23%> (+2.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4e0e3ae...1ee5ae7. Read the comment docs.

codecov[bot] avatar Jul 28 '20 21:07 codecov[bot]

This is great. It solves my use case, which is to combine it with responsive-loader. It takes a very long time since it generates multiple versions of each image. I was bummed when I realized it wouldn't emit the files on the second run.

bravomartin avatar Aug 10 '20 13:08 bravomartin

Commitlint has been updated. and I've fixed npm audit issue. Now ready to merge! @evilebottnawi Could you review the PR please?

mochiya98 avatar Aug 17 '20 01:08 mochiya98

I'm eagerly awaiting for this PR to be merged.

It will make this plugin so much more useful since it will allow using it for caching assets when responsive-loader and other slow loaders.

bravomartin avatar Aug 19 '20 19:08 bravomartin

We are waiting for this PR too! It is a bit odd that cache-loader does not cache images, and it took us a while to debug.

runemadsen avatar Aug 27 '20 11:08 runemadsen