Skip to content

Commit

Permalink
fix: Skip copying non-chunk JS outputs in the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Dec 17, 2023
1 parent 23bbc75 commit e489a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export function PrerenderPlugin({

let prerenderEntry;
for (const output of Object.keys(bundle)) {
if (!/\.js$/.test(output)) continue;
if (!/\.js$/.test(output) || bundle[output].type !== "chunk") continue;

await fs.writeFile(
path.join(tmpDir, path.basename(output)),
Expand Down

0 comments on commit e489a37

Please sign in to comment.