mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 19:13:34 +08:00
When using the experimental esbuild-based browser application builder, input files for the build will now be checked to determine if they are non-ESM modules. This behavior is comparable to the existing behavior within the default Webpack-based browser. Warnings will now be issued for any non-ESM modules (for example, CommonJS or UMD) when script optimizations are enabled (typically production builds). ESM files can be tree- shaken and otherwise optimized in ways that CommonJS files cannot which allows for more optimized and smaller output bundle files. If any allowed dependencies are provided via the `allowedCommonJsDependencies` option, both the direct import and any deep imports of the dependency will be ignored during the checks and no diagnostic will be generated for the dependency.