Skip to content

Commit

Permalink
fix: Sourcemap regex (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian authored Jun 4, 2024
1 parent 29dbe95 commit 5d88b42
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 @@ -229,7 +229,7 @@ export function PrerenderPlugin({
if (output.endsWith(".js") && bundle[output].type == "chunk") {
(bundle[output] as OutputChunk).code = (bundle[
output
] as OutputChunk).code.replace(/^\/\/#\ssourceMappingURL=.*$/, "");
] as OutputChunk).code.replace(/\n\/\/#\ssourceMappingURL=.*/, "");
}
}
if (!output.endsWith(".js") || bundle[output].type !== "chunk")
Expand Down

0 comments on commit 5d88b42

Please sign in to comment.