Add an option to Disable es5 support in Build
See original GitHub issue🚀 Feature request
- [ ] new
- [x] build
- [ ] serve
- [ ] test
Description
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.
Describe the solution you’d like
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.Describe alternatives you’ve considered
I can manually everytime delete these tags from html `<script src="*-es5.js" type="module">`Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
how to turn off differential loading in Angular v8?
In Angular 8 the file browserlist have to be in project root folder. Following entries were needed on my project to disable differential ......
Read more >how I can disable Differential Loading? - DEV Community
open tsconfig.json and set target: "es5" . Then Angular CLI builds your code with ES5 bundle only. 1 like Like
Read more >Deployment - Angular
When you are ready to deploy your Angular application to a remote server, you have various options for deployment. Simple deployment optionslink.
Read more >Documentation - tsc CLI Options - TypeScript
Flag Type Default
‑‑allowJs boolean false
‑‑allowUmdGlobalAccess boolean false
‑‑allowUnreachableCode boolean
Read more >Stencil Config
Setting buildEs5 to prod will only build ES5 in prod mode. Basically if the app does not need to run on legacy browsers...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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 includeChrome 70
, for instance, will result in only one set of bundles.