Skip to content

Commit 5431f7a

Browse files
authored
Merge pull request #2077 from MarceloLeite2604/cli
cli: Check "NODE_ENV" env var value for config files location
2 parents a027e63 + bda246a commit 5431f7a

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/cli/src/commands/app/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { buildBundle } from '../../lib/bundler';
2222

2323
export default async (cmd: Command) => {
2424
const appConfigs = await loadConfig({
25-
env: 'production',
25+
env: process.env.NODE_ENV ?? 'production',
2626
rootPaths: [paths.targetRoot, paths.targetDir],
2727
});
2828
await buildBundle({

packages/cli/src/commands/app/serve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { serveBundle } from '../../lib/bundler';
2222

2323
export default async (cmd: Command) => {
2424
const appConfigs = await loadConfig({
25-
env: 'development',
25+
env: process.env.NODE_ENV ?? 'development',
2626
rootPaths: [paths.targetRoot, paths.targetDir],
2727
});
2828
const waitForExit = await serveBundle({

packages/cli/src/commands/backend/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { serveBackend } from '../../lib/bundler/backend';
2222

2323
export default async (cmd: Command) => {
2424
const appConfigs = await loadConfig({
25-
env: 'development',
25+
env: process.env.NODE_ENV ?? 'development',
2626
rootPaths: [paths.targetRoot, paths.targetDir],
2727
});
2828

packages/cli/src/commands/plugin/export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { buildBundle } from '../../lib/bundler';
2222

2323
export default async (cmd: Command) => {
2424
const appConfigs = await loadConfig({
25-
env: 'production',
25+
env: process.env.NODE_ENV ?? 'production',
2626
rootPaths: [paths.targetRoot, paths.targetDir],
2727
});
2828
await buildBundle({

packages/cli/src/commands/plugin/serve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { serveBundle } from '../../lib/bundler';
2222

2323
export default async (cmd: Command) => {
2424
const appConfigs = await loadConfig({
25-
env: 'development',
25+
env: process.env.NODE_ENV ?? 'development',
2626
rootPaths: [paths.targetRoot, paths.targetDir],
2727
});
2828
const waitForExit = await serveBundle({

0 commit comments

Comments
 (0)