Skip to content

Commit

Permalink
🌱 Explicitly set NODE_ENV for npm scripts (#1504)
Browse files Browse the repository at this point in the history
Being explicit about what the `NODE_ENV` value should be for each npm
script where the value could impact the results can help remove any
errors in future. Motivated by working on #1502.

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
  • Loading branch information
sjd78 committed Nov 1, 2023
1 parent 2f8d58f commit 82f8b7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"extract": "i18next --config i18next-parser.config.js",
"prebuild": "npm run clean && npm run tsc -- --noEmit",
"build": "NODE_ENV=production webpack --config ./config/webpack.prod.ts",
"build:dev": "webpack --config ./config/webpack.dev.ts",
"start:dev": "webpack serve --config ./config/webpack.dev.ts",
"test": "jest --rootDir=. --config=./config/jest.config.ts",
"build:dev": "NODE_ENV=development webpack --config ./config/webpack.dev.ts",
"start:dev": "NODE_ENV=development webpack serve --config ./config/webpack.dev.ts",
"test": "NODE_ENV=test jest --rootDir=. --config=./config/jest.config.ts",
"lint": "eslint .",
"tsc": "tsc -p ./tsconfig.json"
},
Expand Down
4 changes: 2 additions & 2 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"clean": "rimraf ./dist",
"lint": "eslint .",
"prebuild": "npm run clean",
"build": "rollup -c",
"start:dev": "rollup -c --watch"
"build": "NODE_ENV=production rollup -c",
"start:dev": "NODE_ENV=development rollup -c --watch"
},
"lint-staged": {
"*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}": "eslint --fix",
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rimraf ./dist",
"lint": "eslint .",
"build": "NODE_ENV=production rollup -c",
"start:dev": "ROLLUP_RUN=true rollup -c -w",
"start:dev": "NODE_ENV=development ROLLUP_RUN=true rollup -c -w",
"start": "npm run build && node --enable-source-maps dist/index.js"
},
"lint-staged": {
Expand Down

0 comments on commit 82f8b7b

Please sign in to comment.