Skip to content

Commit

Permalink
perf(compress): exclude stream polyfills
Browse files Browse the repository at this point in the history
- Alias readable-stream with node:stream to use builtin stream support.
  • Loading branch information
skjsjhb committed Jan 10, 2025
1 parent 0cb2aef commit 67bc6d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export async function build(variant: BuildVariant) {
define: defines,
outdir: outputDir,
metafile: true,
drop: cfg.variant.mode === "production" ? ["console"] : undefined
drop: cfg.variant.mode === "production" ? ["console"] : undefined,
alias: {
"readable-stream": "node:stream"
}
};

const mainBuildOptions: BuildOptions = {
Expand Down

0 comments on commit 67bc6d1

Please sign in to comment.