mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 15:02:11 +08:00
Service worker augmentation of an application is now supported when using the experimental `browser-esbuild` application builder. Both the `serviceWorker` and `ngswConfigPath` options are now available for use. The implementation leverages the `augmentAppWithServiceWorker` internal function that is used by the Webpack-based builder. This function currently reads the application files from the filesystem after all the application files are written. With the `browser-esbuild`builder, all application files are available in-memory. This can allow a future version of the service worker code to avoid additional file access and further improve build time performance when using a service worker. Future work will investigate the creation of an `augmentAppWithServiceWorker` variant that supports accessing these in-memory files.