Js-beautify: await import(...)

Created on 11 Aug 2017  路  2Comments  路  Source: beautify-web/js-beautify

Expected:

const module = await import('...')

Actual:

const module = await 
import ('...')      ^
      ^
  • newline between await and import
  • space between import and ('...')
javascript bug

Most helpful comment

Webpack uses this syntax for importing modules lazily. Not sure if this is (or going to be) a standard though.

Edit: There's actually a (stage 3) proposal for dynamic import: https://github.com/tc39/proposal-dynamic-import

All 2 comments

Webpack uses this syntax for importing modules lazily. Not sure if this is (or going to be) a standard though.

Edit: There's actually a (stage 3) proposal for dynamic import: https://github.com/tc39/proposal-dynamic-import

@laggingreflex #1393 Partially addresses this.

Was this page helpful?
0 / 5 - 0 ratings