-
Notifications
You must be signed in to change notification settings - Fork 390
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
chore(size-limit): test esm packages and update size-limit dep #1338
chore(size-limit): test esm packages and update size-limit dep #1338
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
958ce28
to
4ff82cd
Compare
@thekip What does the upgrading of |
@Martin005 do you really understand how this package works? Please read the docs, and improve your understanding what exactly size-limit doing and where exactly this 5kb appeared. |
@thekip please briefly explain it here |
This change did not increase actual size of the package. This affects only reporting of the size by |
4ff82cd
to
3fecc46
Compare
3fecc46
to
5aaf0f1
Compare
Rebased to main and add "react" as "external". Because we assume every app which going to use @lingui/react would already have react in the bundle, so we should not take it into account in budget calculation. |
All bundlers actually consume ESM version of packages. CJS version is usually used by nodejs. So it's make more sense to test ESM versions for the size because it will bundled and shipped to the browser.
I had to rise the limit for
@lingui/core package
to 5.5kb. It's not related to CJS/ESM change, it's related tosize-limit
dependecy update. It uses fresher bundlers which generate a slightly bigger results for both targets (CJS/ESM) i've tested it both with esbuild and webpack bundlers.