Skip to content

Support transpile async await for ES2017 target #16996

@JiaLiPassion

Description

@JiaLiPassion

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

A clear and concise description of the problem or missing capability...

Now Angular can work properly for target ES2015, but if we want to build for target ES2017, the native async/await will not work because Zone.js can't monkey patch native async/await. (angular/angular#31730) But we still want the other ES2017+ native features.

Describe the solution you'd like

If you have a solution in mind, please describe it.

So if we can use some plugin of webpack with https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/build_webpack, to process the bundle and only transpile the async/await code to generator, but keep all other ES2017+ code as native, it maybe a acceptable solution for now until we can find some other solutios.

Describe alternatives you've considered

Have you consid ered any alternative solutions or workarounds?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions