perf(core): minify large third-party chunks#8160
Conversation
📝 WalkthroughWalkthroughThe node library configuration adds a regular expression for selected third-party chunks. Matching chunks use fully enabled JavaScript minification, while other chunks retain the existing minification options with matching chunks excluded. The shared 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/rslib.config.ts`:
- Around line 210-221: Update the minify configuration in the production node
build to spread the shared nodeMinifyConfig before overriding jsOptions,
preserving its CSS-disabled setting while retaining the specialized jsOptions
entries for fullyMinifiedChunks and nodeMinifyConfig.jsOptions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f4abd63a-3508-44d3-a66b-d886da8d90f1
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/core/rslib.config.tsscripts/config/rslib.config.ts
Summary
This PR fully minifies nine large
@rsbuild/corechunks composed primarily of third-party code while preserving readable output for the remaining chunks. It also updates Rslib's indirect@rsbuild/coreresolution from 2.1.6 to 2.1.7 to enable multiple JS minimizer options.open.jslaunch-editor-middleware.jsmanifest-plugin.jschokidar.jsconnect-next.jstinyglobby.jsws.jshttp-proxy-middleware.jsmemfs.jsThe selected chunks' gzip size decreases from 157.2 kB to 117.1 kB (-25.5%). The complete Node output decreases from 1408.0 kB to 963.0 kB (-31.6%), with gzip decreasing from 291.6 kB to 251.5 kB (-13.8%). Measurements were collected from
packages/core/distafterpnpm --filter @rsbuild/core run build, using gzip level 9.Related Links