webpack-contrib / cache-loader

[DEPRECATED] Caches the result of following loaders on disk
MIT License
638 stars 51 forks source link

Absolute paths in cache. #36

Closed gdborton closed 5 years ago

gdborton commented 6 years ago

Hello!

We've been continuing to tune our build performance, and are happy to see that cache-loader seems to perform slightly better than babel-loader's cache (and are definitely happy to see that it applies to other loaders as well).

We're seeing an issue with it though in that it stores absolute paths in the cache files, which means that the cache cannot be shared across our build workers. I was hoping that I could correct the paths in the cache files directly, but it seems that the cacheKey used for naming the files is also generated using absolute paths.

This means that it's totally unusable for us in CI, which is where I think the primary benefit will be seen.

Any idea if this would be possible to correct?

alexander-akait commented 6 years ago

@gdborton feel free to do experiment with this and send PR

gdborton commented 6 years ago

@evilebottnawi PR is open.

mistic commented 5 years ago

@evilebottnawi we can close this after merging https://github.com/webpack-contrib/cache-loader/pull/49