Open xgqfrms opened 2 years ago
https://github.com/kentcdodds/cross-env#cross-env-vs-cross-env-shell
https://github.com/kentcdodds/cross-env/issues/192#issuecomment-513341729
cmd
=>powershell
# in .npmrc
script-shell = "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
# using the CLI
$ npm config set script-shell = "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
https://stackoverflow.com/questions/65844864/cross-env-not-changing-env-variable-when-running-yarn
webpack.config.js
{
// ...
plugins: [
// ...
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
}),
],
}
require("cross-env") All In One