In my package.json
, I have a build
script set to build my next project as follows:
"build": "echo \"$NODE_ENV\" && NODE_ENV=$NODE_ENV next build && npm run build-server",
The output from the command that I get is:
> admin-ui@1.0.0 build /usr/src/admin-ui
> echo "$NODE_ENV" && NODE_ENV=$NODE_ENV next build && npm run build-server
development
Creating an optimized production build ...
The echo
outputs development
as the value for $NODE_ENV
. However, I cannot get that passed to next. It just ignores it.
Using next.js version 9.0.5
.