kentcdodds / cross-env

🔀 Cross platform setting of environment scripts
https://www.npmjs.com/package/cross-env
MIT License
6.32k stars 243 forks source link

Angular compilation problem #239

Closed kKen94 closed 4 years ago

kKen94 commented 4 years ago

In angular compilation NODE_ENV is undefined with this configuration. I have my own webpack to extend basic configuration

Angular script:

"build:prod": "cross-env NODE_ENV=prod && ng build --prod"

webpack.config.js:

...process.env.NODE_ENV === 'prod'
              ? [purgecss]
              : []
kKen94 commented 4 years ago

My bad, I should have removed "&&"