Skip to content

Commit

Permalink
fix(ssr): skip updateCjsSsrExternals if legacy flag disabled (#13230)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored May 17, 2023
1 parent d09bbd0 commit 13fc345
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ export async function _createServer(
if (isDepsOptimizerEnabled(config, true)) {
await initDevSsrDepsOptimizer(config, server)
}
await updateCjsSsrExternals(server)
if (config.legacy?.buildSsrCjsExternalHeuristics) {
await updateCjsSsrExternals(server)
}
return ssrLoadModule(
url,
server,
Expand Down

0 comments on commit 13fc345

Please sign in to comment.