Comments (8)
For the record, I do not use cache-loader
anymore, as webpack does a fine job now like @evilebottnawi said.
from cache-loader.
@jdeniau need tests mtime vs md4 from hash content. PR welcome 👍
from cache-loader.
Maybe this could be slightly more generic, can supply a custom compare function for the comparison callback?
from cache-loader.
👍 for the PR made by @LukeSheard
from cache-loader.
My diagnosis might not be correct, but I think this problem is impacting us as well. We have some custom loaders in our project written in TypeScript. When we run a build, we compile the TypeScript to JavaScript before running webpack - giving the custom loaders a new mtime. The loaders are added as dependencies by cache-loader
, thus we can never get cached content.
Any chance the PR from @LukeSheard could be revived?
from cache-loader.
is this fixed?
from cache-loader.
@sibelius no, cache-loader
is low priority due webpack@5 will have built-in cache, anyway if you want to fix something PR welcome
from cache-loader.
I attempted to workaround this by comparing based on ctime
, but unfortunately only mtime
is stored in the cache.
So ultimately, I went with the approach recommended in webpack's docs: use a postinstall
hook to remove the node_modules/.cache/cache-loader
folder.
https://webpack.js.org/guides/build-performance/#persistent-cache
from cache-loader.
Related Issues (20)
- memory leak when using different splitchunks optimizations options HOT 3
- optimize cache-loader performance
- Should I remove cache-loader in webpack5 HOT 1
- file do not emit at the first build when using cache-loader with file-loader HOT 1
- Exception: Cannot read property 'stat' of undefined HOT 10
- bug report of 1.2.4 HOT 12
- custom write and read are much slower than the default HOT 3
- Module build failed: TypeError: Cannot read property 'async' of undefined at react-app-dashboard/node_modules/babel-loader/lib/index.js:50:27 HOT 1
- Change default cache directory HOT 1
- Should source maps be cached? HOT 1
- Should cache-loader use `module.exports.raw = true` to handle binary file ? HOT 6
- Using relative paths - sources still contains absolute paths HOT 5
- usage with eslint-loader, warnings/errors are swallowed after successful compilation HOT 5
- Can you describe when user should invalidate cache via setup custom cache dir, identity, etc? HOT 2
- using with file-loader, files are not builded if in cache, even if dist folder is empty HOT 5
- Use relative path on this.fs.stat returns stale metadata
- Control `cacheDirectory` with env variable HOT 3
- invalidate with cache HOT 3
- Cache TTL to assests HOT 1
- No files emitted with responsive-loader HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cache-loader.