WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit fae1e55

Browse files
authored
fix(preview): respect dotenv command-line arg (#1144)
1 parent 2eb32d2 commit fae1e55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/nuxi/src/commands/preview.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ const command = defineCommand({
4242
const resolvedOutputDir = await new Promise<string>((res) => {
4343
loadNuxt({
4444
cwd,
45+
dotenv: {
46+
cwd,
47+
fileName: ctx.args.dotenv,
48+
},
4549
envName: ctx.args.envName, // c12 will fall back to NODE_ENV
4650
ready: true,
4751
overrides: {

0 commit comments

Comments
 (0)