Skip to content

Commit

Permalink
refactor: Bail out on multiple outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Dec 4, 2024
1 parent 689efaf commit fc27c6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/prerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ export function PrerenderPlugin({
// We're only going to alter the chunking behavior in the default cases, where the user and/or
// other plugins haven't already configured this. It'd be impossible to avoid breakages otherwise.
if (
(Array.isArray(config.build.rollupOptions.output) &&
(config.build.rollupOptions as OutputOptions[])?.length > 1) ||
Array.isArray(config.build.rollupOptions.output) ||
(config.build.rollupOptions.output as OutputOptions)?.manualChunks
)
) {
return;
}

config.build.rollupOptions.output ??= {};
(config.build.rollupOptions.output as OutputOptions).manualChunks = (
Expand Down

0 comments on commit fc27c6a

Please sign in to comment.