i really feel confused when i want to set some environment variable in one project's package.json scripts.i tried script like:
"start": "cp -f ./src... && NODE_ENV=dev wepy build --watch"
it works right and i get dev
of process.env.NODE_ENV
.
But why the following commands i firstly wrote can't set environment variable.and i get undefined
of process.env.NODE_ENV
:
"start": "cp -f ./src... && NODE_ENV=dev && wepy build --watch"
or
"start": "NODE_ENV=dev && cp -f ./src... && wepy build --watch"
what's wrong with my code?