Closed seawatts closed 6 years ago
I think we actually want to use an environment variable. This --
syntax with npm run
means the remaining arguments will be passed to the script that npm run build
executes, but we can't guarantee that will be denali build
- someone may introduce their own build/prebuild script that invokes denali build along the way. But if we set an environment variable, that has a much better chance of surviving through whatever build script the user adds and making it to the denali build process.
Will denali build in production if we set NODE_ENV=production
?
It should, although I'm not 100% sure it does.
Closing for lack of activity.
This is something we want to do though (build for production on publish). But see the comments above: environment variable is likely the best way to accomplish this.
If anyone is interested in carrying this across the finish line: we need to verify that NODE_ENV actually does set the environment during build, and then set it here.
Closes https://github.com/denali-js/denali-cli/issues/35