-
-
Notifications
You must be signed in to change notification settings - Fork 51
Do not rely on file mtime
#34
Comments
@jdeniau need tests mtime vs md4 from hash content. PR welcome 👍 |
Maybe this could be slightly more generic, can supply a custom compare function for the comparison callback? |
mtime
👍 for the PR made by @LukeSheard |
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 Any chance the PR from @LukeSheard could be revived? |
is this fixed? |
@sibelius no, |
For the record, I do not use |
I attempted to workaround this by comparing based on So ultimately, I went with the approach recommended in webpack's docs: use a https://webpack.js.org/guides/build-performance/#persistent-cache |
npm 5.8+ set file mtime to October 1985 (See npm/npm#20439 ), it's a feature for them, so the cache-loader does not work anymore.
Furthermore, f24f723 tells to not trust file mtime.
Should we relly on file content hash instead ?
The text was updated successfully, but these errors were encountered: