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

[*] Fix: size-limit report for esm modules #6234

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

etrepum
Copy link
Collaborator

@etrepum etrepum commented Jun 1, 2024

Description

For some reason the default configuration of size-limit for @lexical/plain-text caused nearly the whole module to be tree shaken, so nothing of interest was measured. This makes sure to test the full size of every package we are measuring.

Closes #6233

Test plan

Before

size-limit would report a 225 bytes for @lexical/plain-text esm

  @lexical/plain-text - esm
  Size:         225 B with all dependencies, minified and brotlied
  Loading time: 10 ms on slow 3G

After

size-limit should report a meaningful number for @lexical/plain-text esm

  @lexical/plain-text - esm
  Size:         24.44 kB with all dependencies, minified and brotlied
  Loading time: 478 ms   on slow 3G

Copy link

vercel bot commented Jun 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2024 11:08pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2024 11:08pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 1, 2024
Copy link

github-actions bot commented Jun 1, 2024

size-limit report 📦

Path Size
lexical - cjs 23.97 KB (0%)
lexical - esm 23.96 KB (0%)
@lexical/rich-text - cjs 34.69 KB (0%)
@lexical/rich-text - esm 23.95 KB (0%)
@lexical/plain-text - cjs 34.63 KB (0%)
@lexical/plain-text - esm 225 B (0%)
@lexical/react - cjs 149.29 KB (0%)
@lexical/react - esm 82.64 KB (0%)

@etrepum
Copy link
Collaborator Author

etrepum commented Jun 1, 2024

The github action for size-limit does some wonky stuff to base it from main for comparison, but I did confirm that it is doing the right thing locally. You can see this in other size-limit related PRs such as #6219 and #6209 and see that their PR comments are not based on the incoming config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [*] size-limit report for @lexical/plain-text esm seems wrong
3 participants