Skip to content

Commit 9ac5075

Browse files
authored
fix(ssr): enable inlineDynamicImports when input has length 1 (#9904)
1 parent 632fedf commit 9ac5075

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/vite/src/node/build.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,8 @@ async function doBuild(
481481
inlineDynamicImports:
482482
output.format === 'umd' ||
483483
output.format === 'iife' ||
484-
(ssrWorkerBuild && typeof input === 'string'),
484+
(ssrWorkerBuild &&
485+
(typeof input === 'string' || Object.keys(input).length === 1)),
485486
...output
486487
}
487488
}

0 commit comments

Comments
 (0)