- [ ] new
- [x] build
- [ ] serve
- [ ] test
with the release of Version 8, Both es5 and es2015 files are generated on ng build. e.g.
main-es5.js , main-es2015.js. Build time also increased due to running two times.
Add a build parameter that disables generation of *-es5.js files. For a person using only Chrome ( latest) *-es5.js files aren't required. This will speed up the build and reduce number of files.
I can manually everytime delete these tags from html <script src="*-es5.js" type="module">
The browserslist file is used to determine which bundle types are required to be built. If only browsers that support ES2015+ are listed then only ES2015 bundles will be generated. The intention is for the application's browser requirements to be specified in the file and then the CLI will generate the appropriate set of files.
Changing the file to only include Chrome 70, for instance, will result in only one set of bundles.
The default configuration with browserslist generates two bundles. When using Service Workers, this has a detrimental effect on the traffic consumed, since with any update both files are always downloaded. I think this should be fixed so that only one bundle is used in the default configuration (es5) until it is possible to completely abandon the two bundles in the standard configuration.
Someone please paste the browser configuration , that would generate only es6 bundles.
@clydin
Please see my comment above.
However, please note that the purpose of the Browserslist file is to represent the required target browsers for the application. The CLI will then use that list of browsers and generate the proper set and type of bundles as well as prefix and optimize the stylesheets for the application. This will ensure that the application will work as intended on the browsers that the application is required to support. Not doing so will cause the application to potentially not function or contain visual issues that may be hard to find or troubleshoot.
Someone please paste the browser configuration , that would generate only es6 bundles.
@clydin
Use last 2 Chrome versions
@saiKumarGanji
If you really want support es2015 only, check https://github.com/angular/angular-cli/issues/14639#issuecomment-500458409
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
The default configuration with browserslist generates two bundles. When using Service Workers, this has a detrimental effect on the traffic consumed, since with any update both files are always downloaded. I think this should be fixed so that only one bundle is used in the default configuration (es5) until it is possible to completely abandon the two bundles in the standard configuration.