🚀 Feature request
Command (mark with an x)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Description
This proposal is inspired by the Chrome team's work on babel/preset-modules.
Currently, Angular CLI's mechanism for differential loading is simple; creating original bundles targetted in ES2015 and down-leveling it for ES5 compatible.
But today, modules-compatible browsers can accept more modern JavaScript than es2015 like async/await, Object Spread, Tagged Template, and more. So the Chrome team created a babel preset for getting more compact modern JavaScript.
Please see more https://github.com/babel/preset-modules#how-does-it-work.
I guess that idea can help also Angular CLI's build process. Generate original bundles for browsers that support ES Modules, and down-leveling it for legacy browsers.
I'm not sure how we can achieve it with TypeScript-based toolchain, but I hope it isn't impossible.
🚀 Feature request
Command (mark with an
x)Description
This proposal is inspired by the Chrome team's work on babel/preset-modules.
Currently, Angular CLI's mechanism for differential loading is simple; creating original bundles targetted in ES2015 and down-leveling it for ES5 compatible.
But today, modules-compatible browsers can accept more modern JavaScript than
es2015likeasync/await, Object Spread, Tagged Template, and more. So the Chrome team created a babel preset for getting more compact modern JavaScript.Please see more https://github.com/babel/preset-modules#how-does-it-work.
I guess that idea can help also Angular CLI's build process. Generate original bundles for browsers that support ES Modules, and down-leveling it for legacy browsers.
I'm not sure how we can achieve it with TypeScript-based toolchain, but I hope it isn't impossible.