Skip to content

feature request: single assets in i18n builds #26286

@zip-fa

Description

@zip-fa

Command

build

Description

Hi.
Currently angular just copy assets folder to every localized build. This leads to enormous dist size (in my case every locale with assets weigths 180MB, which can be multiplied by 15 locales).

Describe the solution you'd like

My proposal is to put assets folder in root directory, instead of copying it inside every built locale, and symlink it inside every locale. This will give us better build times, and also will fix issues where developers use absolute urls to assets, eg:

<img src=“/assets/img.png” />

My solution will give developers a way to use localized builds in mobile apps development (with capacitor for example; for now it’s strange to publish mobile app which weights over 2gb), better build times (no need to copy assets to every locale), better deploy times (transfer 180mb instead of 2.7GB)

Describe alternatives you've considered

Currently, the only issue i encounter, is absolute path usage (described it in my example with img src). I make symlink to get this working:

/en/assets -> /assets

Metadata

Metadata

Assignees

No one assigned

    Labels

    devkit/build-angular:i18nfeatureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under consideration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions