Skip to content

Commit f22c7ca

Browse files
committed
feat: set process.env.NODE_ENV
1 parent 1dfb95a commit f22c7ca

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/mars-cli/lib/build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ async function build(cmd) {
1717
build
1818
} = require(buildPath + '/src/scripts/run');
1919

20+
21+
process.env.NODE_ENV = 'production';
22+
2023
build(config, {
2124
target,
2225
build: true

packages/mars-cli/lib/serve.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ async function start(cmd) {
1818
} = require(buildPath + '/src/scripts/run');
1919

2020
let isServiceStarted = false;
21+
22+
process.env.NODE_ENV = 'development';
23+
2124
watch(config, {
2225
target
2326
}).on('stop', () => {

0 commit comments

Comments
 (0)