Closed komagic closed 4 years ago
new HardSourceWebpackPlugin({
cacheDirectory: path.resolve(__dirname, '../.cache/hard-source/[confighash]'),
info: {
mode: 'none',
level: 'error',
},
environmentHash: {
root: process.cwd(),
directories: ['config'],
files: ['package-lock.json', 'yarn.lock'],
},
}),
By adding my env files into environmentHash dirs, I solved it
Expected Behavior
I set two scripts in package.json, npm run start:daily( cross-env NODE_ENV=daily) and npm run start:test( cross-env NODE_ENV=test),i use define- plugin define 'process.env.NODE_ENV'=process.env.NODE_ENV(daily and test), but i found that when i run start:daily with hard-source-webpack-plugin, then secondly, I change to npm run start:test, the app still in daily environment ? so what should I do make it correctly?
Actual Behavior
the app still in daily environment
Is an error being thrown?
none
Steps to Reproduce
Operating System, Node, and NPM dependency versions
"hard-source-webpack-plugin": "^0.13.1"