mirror of
https://github.com/strapi/strapi.git
synced 2026-01-06 12:13:52 +00:00
fix(pack-up): set NODE_ENV if it's not already set (#18583)
This commit is contained in:
parent
5daf92f107
commit
d9554abef3
@ -33,6 +33,13 @@ interface BuildWithoutConfigFile extends BuildCLIOptions {
|
||||
type BuildOptions = BuildWithConfigFile | BuildWithoutConfigFile;
|
||||
|
||||
const build = async (opts: BuildOptions = {}) => {
|
||||
/**
|
||||
* We always want to run in production mode when building and some packages
|
||||
* use NODE_ENV to determine which type of package to import (looking at your react).
|
||||
* Therefore for building, unless it's specifically set by the user, we'll set it to production.
|
||||
*/
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'production';
|
||||
|
||||
const {
|
||||
silent,
|
||||
debug,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user