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

intl-getcanocicallocales is probably not a good idea #228

Closed
brunnerh opened this issue Sep 3, 2023 · 2 comments
Closed

intl-getcanocicallocales is probably not a good idea #228

brunnerh opened this issue Sep 3, 2023 · 2 comments
Assignees

Comments

@brunnerh
Copy link

brunnerh commented Sep 3, 2023

Referring to:

  1. The package is huge, relatively speaking.

    image
    (Bundlephobia)

    I was not sure whether that would be representative, e.g. maybe there was some unused code that would not end up in the final bundle, but putting the new svelte-i18n version in a test project, that does not look too good.

    root/_app/immutable/nodes/6.01fdf54a.js/E:/dev/sveltekit-test/node_modules/@formatjs/intl-getcanonicallocales
    Rendered: 89.91KB (0.54%)
    Gzip: 23.79KB
    Brotli: 17.64KB

    Rendered is a byte size of individual file after transformations and treeshake.
    Gzip and Brotli is a byte size of individual file after individual transformations,
    treeshake and compression.

    (via rollup-plugin-visualizer)

  2. It breaks usage in the REPL.

  3. It does not seem to actually solve whatever is the root issue.
    I noted in the associated issue that the issue can happen even with ostensibly valid locales. When testing the new version in my application, interpolation is still broken, but works with v.3.2.0.

@kaisermann
Copy link
Owner

Hey @brunnerh, you're right. I will take a better look at this

@kaisermann
Copy link
Owner

Let's continue on #209

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

No branches or pull requests

2 participants