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: exclude react/jsx-runtime from bundle #2

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

Simon-Laux
Copy link
Contributor

before:

dist/index.js          39.18 kB │ gzip: 11.81 kB
dist/index.umd.cjs  26.25 kB │ gzip: 10.26 kB

after:

dist/index.js          18.00 kB │ gzip: 5.68 kB
dist/index.umd.cjs  12.70 kB │ gzip: 5.10 kB

So this halfs the bundle size.

Though note I'm not sure about the global for the UMD module, vite guessed something, but I personally use esm, so not sure how to go about it:

No name was provided for external module "react/jsx-runtime" in "output.globals" – guessing "jsxRuntime".

before:
dist/index.js          39.18 kB │ gzip: 11.81 kB
dist/index.umd.cjs  26.25 kB │ gzip: 10.26 kB

after:
dist/index.js          18.00 kB │ gzip: 5.68 kB
dist/index.umd.cjs  12.70 kB │ gzip: 5.10 kB
@seiwonpark seiwonpark self-requested a review October 19, 2023 03:30
@seiwonpark seiwonpark added the good first issue Good for newcomers label Oct 19, 2023
Copy link
Owner

@seiwonpark seiwonpark left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I've left a single comment for this PR.

Copy link
Owner

@seiwonpark seiwonpark left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution 👍!!

@seiwonpark seiwonpark merged commit 613c6b9 into seiwonpark:main Oct 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants