angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

application builder: angular adds every locale data in i18n builds

Open zip-fa opened this issue 2 years ago • 4 comments

Command

build

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Hi. In each localized build (lets say pl), every locale from angular.json is included in polyfills.js. Attaching screenshot from esbuild-analyzer:

image

Minimal Reproduction

ng build

Exception or Error

No response

Your Environment

Angular CLI: 17.0.0
Node: 18.18.2
Package Manager: npm 9.8.1
OS: darwin arm64

Angular: 17.0.2
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0
@angular-devkit/build-angular   17.0.0
@angular-devkit/core            17.0.0
@angular-devkit/schematics      17.0.0
@angular/cdk                    17.0.0
@angular/cli                    17.0.0
@angular/material               17.0.0
@angular/ssr                    17.0.0
@schematics/angular             17.0.0
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.0

Anything else relevant?

No response

zip-fa avatar Nov 12 '23 20:11 zip-fa

This is currently expected behavior. While not ideal, each locale's data has a minimal size and will feature some additional upcoming size reductions. Additionally it typically compresses well. Also, we are evaluating the use of the standard Intl API as a replacement for these files which would eliminate their inclusion in the application bundles.

clydin avatar Nov 13 '23 17:11 clydin

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Nov 14 '23 13:11 angular-robot[bot]

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] avatar Dec 24 '23 13:12 angular-robot[bot]

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Jan 12 '24 13:01 angular-robot[bot]