Skip to content

Commit

Permalink
fix: optimizeDeps during build and external ids (#13274)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 23, 2023
1 parent e444375 commit e3db771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/optimizedDeps.ts
Expand Up @@ -106,12 +106,12 @@ export function optimizedDepsBuildPlugin(config: ResolvedConfig): Plugin {
...options,
skipSelf: true,
})
if (resolved) {
if (resolved && !resolved.external) {
depsOptimizer.delayDepsOptimizerUntil(resolved.id, async () => {
await this.load(resolved)
})
return resolved
}
return resolved
}
},

Expand Down

0 comments on commit e3db771

Please sign in to comment.