And another question do…
And another question: does anyone know if a command such as nx run web:build –prod is supposed to set Webpack’s mode to ‘production’ if the corresponding entry in angular.json is using a custom Webpack config?
Responses:
I’ve tried invoking it like this: NODE_ENV=production nx run web:build –prod, but the mode option of Webpack doesn’t seem to be set
Not sure itll help, but when i need to set env vars from cli or package.json script i use this https://www.npmjs.com/package/cross-env
Mh I’ve seen that package from time to time, but will it do any better than me writing the script like this? scripts: { “bla”: “NODE_ENV=production nx run web:build –prod }
With the above, I could at least retrieve the value within my webpack.config.js file and set the mode manually (bummer but at least it works :p)