Skip to content

Commit cdeb667

Browse files
committed
fix(vite): always enable noExternal for prod
(nf3 will trace)
1 parent e059a9a commit cdeb667

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/build/vite/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function createNitroEnvironment(
4242
noExternal: ctx.nitro!.options.dev
4343
? // Workaround for dev: external dependencies are not resolvable with respect to nodeModulePaths
4444
new RegExp(runtimeDependencies.join("|"))
45-
: undefined,
45+
: true,
4646
conditions: ctx.nitro!.options.exportConditions,
4747
externalConditions: ctx.nitro!.options.exportConditions,
4848
},

test/minimal/minimal.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const tmpDir = fileURLToPath(new URL(".tmp", import.meta.url));
1111

1212
// Round up to 1KB
1313
const sizeThresholds: Record<string, [kb: number, minKB: number]> = {
14-
vite: [9, 5],
14+
vite: [23, 12],
1515
rollup: [19, 11],
1616
rolldown: [22, 10],
1717
};

0 commit comments

Comments
 (0)