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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't transpile to es5 #1948

Closed
MonstraG opened this issue Apr 25, 2023 · 3 comments
Closed

Don't transpile to es5 #1948

MonstraG opened this issue Apr 25, 2023 · 3 comments

Comments

@MonstraG
Copy link

馃殌 Feature Proposal

We are in 2023, and maybe we can try targeting es6 (especially because this package dropped support for IE in 3 years ago).

This can be easily done by adding

{
  "browserslist": [
    "defaults"
  ]
}

Motivation

I'm using i18next in several applications (trough next-i18next), and often, i18next is a single biggest dependency I have at 100kb (non-minified).

defaults of browserlists targets es6, and this single change drops esm build size down to 81kb. (approx. -20%)

Example

Smaller builds, faster loads worldwide.

@adrai
Copy link
Member

adrai commented Apr 25, 2023

we'll evaluate that for the next major

@gunjam
Copy link

gunjam commented May 24, 2023

I only use i18next serverside in a nodejs application so I'm less concerned about package size, but I would also like a way in require() a non-babeled version of i18next. Babel has introduced a lot of es6 polyfils into the package which have a big performance impact, the i18next object spread polyfil is the hottest code path in my whole application, replacing the npm installed package with a non-babled version of the library increaed my requests per second by 10%!

@adrai
Copy link
Member

adrai commented Jun 9, 2023

prepared for next major version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants