hard-source-webpack-plugin
hard-source-webpack-plugin copied to clipboard
Cache rebuile every time
Expected Behavior
Expect cache will work
Actual Behavior
Cache not work
Each time start up, cache will rebuild
Is an error being thrown?
[hardsource:cloud] Cache is corrupted. Error: ENOENT: no such file or directory, open './run/webpack_cache/hard_source/cloud/module~/log0053' [hardsource:cloud] Last compilation did not finish saving. Building new cache.
Steps to Reproduce
return new HardSourceWebpackPlugin({
cacheDirectory: `${path.join(process.cwd(), './run/webpack_cache/hard_source/[confighash]')}`,
configHash: process.env.EGG_DEPLOY === 'cloud' ? 'cloud' : 'default',
cachePrune: {
sizeThreshold: 300 * 1024 * 1024, // 300 MB
},
});
Operating System, Node, and NPM dependency versions
Mac OS 10.11.6
Node 8.9.1
"hard-source-webpack-plugin": "^0.12.0",
Same when using yarn
with:
"hard-source-webpack-plugin": "^0.12.0"
"webpack": "^4.6.0"
EDIT: Downgrading to 0.11.1 seems to have solved it, however reading from cache is actually slower than just rebuilding
Only works when comenting "cacheDirectory" and using default config.