question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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">`

Stackoverflow post

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
ruslansincommented, Jun 14, 2019

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.

5reactions
clydincommented, Jun 5, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found