Skip to content

Commit

Permalink
fix(ssr): enable inlineDynamicImports when input has length 1 (#9904)
Browse files Browse the repository at this point in the history
  • Loading branch information
ydcjeff committed Aug 30, 2022
1 parent 632fedf commit 9ac5075
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/build.ts
Expand Up @@ -481,7 +481,8 @@ async function doBuild(
inlineDynamicImports:
output.format === 'umd' ||
output.format === 'iife' ||
(ssrWorkerBuild && typeof input === 'string'),
(ssrWorkerBuild &&
(typeof input === 'string' || Object.keys(input).length === 1)),
...output
}
}
Expand Down

0 comments on commit 9ac5075

Please sign in to comment.