js-lingui icon indicating copy to clipboard operation
js-lingui copied to clipboard

Major bundlesize increase with @lingui/core 3.14.0

Open paales opened this issue 2 years ago • 2 comments

Describe the bug

https://bundlephobia.com/package/@lingui/[email protected]

https://github.com/graphcommerce-org/graphcommerce/pull/1536#issuecomment-1168603211

Schermafbeelding 2022-06-28 om 13 39 29

To Reproduce

Use new version and measure the resulting bundle size

Expected behavior

Bundlesize is in the same ballpark als the older version

paales avatar Jun 28 '22 11:06 paales

Don't know if this is related, but for us messageformat-parser gets included in the production build, even though it should get filtered out when the NODE_ENV is set to production, which is +- 5kb. I've fixed it by adding a custom webpack rule that uses the null-loader for that package, but it doesn't seem ideal.

ReinoutStevens avatar Jul 26 '22 13:07 ReinoutStevens

@semoal This one is kinda important, currently stil stuck on the old version :)

paales avatar Aug 10 '22 15:08 paales

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 09 '22 15:10 stale[bot]

Not stale

paales avatar Oct 09 '22 20:10 paales

We noticed this increase in bundle size too. Any change that this could be fixed?

sven-meyer-wetter-com avatar Nov 08 '22 15:11 sven-meyer-wetter-com

Hi guys, sorry for this problem ;| I just checked and the commit that caused the problem was this: https://github.com/lingui/js-lingui/pull/1258 I'm open to suggestions about how to handle exports on package.json to bundlers omit automatically ESM/r CJS..

semoal avatar Nov 10 '22 10:11 semoal

@semoal could you elaborate more on that? Do you think bundlers pull to the bundle both version cjs and esm at the same time?

timofei-iatsenko avatar Dec 13 '22 07:12 timofei-iatsenko

Should be fixed by #1343

timofei-iatsenko avatar Jan 23 '23 09:01 timofei-iatsenko

@thekip Ohh yeahh! Will check this out soon to see if this resolves the issue :)

paales avatar Jan 23 '23 11:01 paales