Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: enable code splitting in build process #886

Merged

Conversation

RyukTheCoder
Copy link
Collaborator

Summary

Enabled code splitting in build options of esbuild. Code splitting is still a work in progress in esbuild docs because it only works with esm output format (which we currently use) and it has a known ordering issue. I'm not sure if we may encounter that issue but the is a workaround introduced to prevent that. You can follow the tracking issue for updates about this feature.

After applying this change and testing it through linking widget-embedded package in app repo, I observed that bundle size is reduced to 1.4MBs.

image

Fixes # 1905

How did you test this change?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Implemented a user interface (UI) change, referencing our Figma design to ensure pixel-perfect precision.

Copy link
Collaborator

@yeager-eren yeager-eren left a comment

Choose a reason for hiding this comment

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

lgtm

@yeager-eren yeager-eren merged commit fe5a41e into next Oct 7, 2024
5 checks passed
@yeager-eren yeager-eren deleted the perf/rf-1905-enable-code-splitting-in-build-process branch October 7, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants