mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 14:02:43 +08:00
When using the esbuild-based application build system through either the `application` or `browser-esbuild` builder, the `localize` option will now allow inlining project defined localizations. The process to configure and enable the i18n system is the same as with the Webpack-based `browser` builder. The implementation uses a similar approach to the `browser` builder in which the application is built once and then post-processed for each active locale. In addition to inlining translations, the locale identifier is injected and the locale specific data is added to the applications. Currently, this implementation adds all the locale specific data to each application during the initial building. While this may cause a small increase in the polyfills bundle (locale data is very small in size), it has a benefit of faster builds and a significantly less complicated build process. Additional size optimizations to the data itself are also being considered to even further reduce impact. Also, with the eventual shift towards the standard `Intl` web APIs, the need for the locale data will become obsolete in addition to the build time code necessary to add it to the application. While build capabilities are functional, there are several areas which have not yet been fully implemented but will be in future changes. These include console progress information, efficient watch support, and app-shell/service worker support.