Skip to content

Conversation

@chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Dec 10, 2025

Summary

Bundle the rslog dependency to main chunk to reduce require() calls.

image

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 10, 2025 09:09
@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 1d8956a
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/693938b59dfec400092062d5
😎 Deploy Preview https://deploy-preview-6746--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 67 (🔴 down 11 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@chenjiahan chenjiahan changed the title perf: bundle Rslog to main chunk perf: bundle rslog dependency to main chunk Dec 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the bundling strategy for the rslog dependency by bundling it directly into the main chunk instead of loading it via require() calls at runtime, reducing the number of dynamic module loads and improving performance.

Key Changes:

  • Converted rslog from a pre-bundled compiled dependency to a directly bundled dependency
  • Updated import statements to use static ES imports instead of dynamic require
  • Modified prebundle configuration to only process types for rslog

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/core/src/logger.ts Changed from dynamic require to static import of rslog logger and type
packages/core/src/helpers/vendors.ts Removed rslog from CompiledPackages type as it's no longer a compiled dependency
packages/core/rslib.config.ts Added type alias for rslog to point to compiled types and improved comment grammar
packages/core/prebundle.config.ts Configured rslog as dtsOnly to bundle types without runtime code prebundling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants