From 0b3890faeba13a755025c21fa0ce53ad4b95e5f8 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 4 Aug 2026 10:28:34 +0800 Subject: [PATCH 1/2] perf(fmt): reduce worker bundle size --- packages/rstack/rslib.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rstack/rslib.config.ts b/packages/rstack/rslib.config.ts index 45704b7..a0274d9 100644 --- a/packages/rstack/rslib.config.ts +++ b/packages/rstack/rslib.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from '@rslib/core'; import pkgJson from './package.json' with { type: 'json' }; -const fullyMinifiedChunks = /lintStaged\.js$/; +const fullyMinifiedChunks = /(?:fmtWorker|lintStaged)\.js$/; export default defineConfig({ lib: [{ syntax: 'es2023', dts: true }], @@ -32,7 +32,7 @@ export default defineConfig({ css: false, jsOptions: [ { - // Fully minify the bundled lint-staged code to reduce package size. + // Fully minify large bundles to reduce package size. include: fullyMinifiedChunks, }, { From 3d62fbd2dbc00a4c129d8e6a7bf59ac8763cefa0 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 4 Aug 2026 10:55:47 +0800 Subject: [PATCH 2/2] perf(fmt): minify formatter bundles --- packages/rstack/rslib.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rstack/rslib.config.ts b/packages/rstack/rslib.config.ts index 89db606..662a0fb 100644 --- a/packages/rstack/rslib.config.ts +++ b/packages/rstack/rslib.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from '@rslib/core'; import pkgJson from './package.json' with { type: 'json' }; -const fullyMinifiedChunks = /(?:fmtWorker|staged)\.js$/; +const fullyMinifiedChunks = /(?:fmt(?:Plugins)?|sortPackageJsonPlugin|staged)\.js$/; export default defineConfig({ lib: [{ syntax: 'es2023', dts: true }], @@ -32,7 +32,7 @@ export default defineConfig({ css: false, jsOptions: [ { - // Fully minify the formatter worker and staged chunk to reduce package size. + // Fully minify formatter and staged command bundles to reduce package size. include: fullyMinifiedChunks, }, {