Skip to content

Commit e3db771

Browse files
authored
fix: optimizeDeps during build and external ids (#13274)
1 parent e444375 commit e3db771

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vite/src/node/plugins/optimizedDeps.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ export function optimizedDepsBuildPlugin(config: ResolvedConfig): Plugin {
106106
...options,
107107
skipSelf: true,
108108
})
109-
if (resolved) {
109+
if (resolved && !resolved.external) {
110110
depsOptimizer.delayDepsOptimizerUntil(resolved.id, async () => {
111111
await this.load(resolved)
112112
})
113-
return resolved
114113
}
114+
return resolved
115115
}
116116
},
117117

0 commit comments

Comments
 (0)