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

When I import a set of i18n strings, all strings for all languages are imported and bundled #13411

Closed
kdinev opened this issue Aug 29, 2023 · 1 comment · Fixed by #13417
Closed
Assignees
Labels
🐛 bug Any issue that describes a bug 🔥 severity: high localization 🔣 i18n version: 16.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@kdinev
Copy link
Member

kdinev commented Aug 29, 2023

Description

Unused language resources are imported and bundled.

  • igniteui-angular version: 16.0.x
  • browser: all

Steps to reproduce

  1. Import localization strings import { IgxResourceStringsBG } from 'igniteui-angular-i18n';
  2. Use them in your app.module
  3. Inspect vendor.js

Result

All languages are included,

Expected result

Only the imported strings should be included.

Attachments

image

@damyanpetev
Copy link
Member

damyanpetev commented Aug 29, 2023

Don't see anything obviously wrong with the exports and barrels in the package, it should be tree-shakable.
Wondering, since Angular's builder is still Webpack based and that tool does insist on "sideEffects": false in the package.json IIRC, perhaps that's the missing bit?

Edit: Yup, that appears to do the trick, will PR in a bit

@damyanpetev damyanpetev added 🛠️ status: in-development Issues and PRs with active development on them and removed 🆕 status: new labels Aug 30, 2023
@damyanpetev damyanpetev added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug 🔥 severity: high localization 🔣 i18n version: 16.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants