kentcdodds / cross-env

🔀 Cross platform setting of environment scripts

Home Page:https://www.npmjs.com/package/cross-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular compilation problem

kKen94 opened this issue · comments

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]
              : []

My bad,
I should have removed "&&"