Skip to content

Async/Await Transpilation #42

Answered by pnikolov
james0r asked this question in Q&A
Discussion options

You must be logged in to vote

@james0r

In order to add support for async/await in your built code you need to modify the .babelrc file and include the es modules, here is the updated .babelrc file:

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
          "esmodules": true
        }
      }
    ]
  ]
}

Having this the output code will correctly handle async/await in the targeted browsers.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pnikolov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants