flow icon indicating copy to clipboard operation
flow copied to clipboard

Support parsing dynamic import() syntax

Open bradencanderson opened this issue 9 years ago • 4 comments

Now that dynamic import is stage 3 and Webpack 2 will support it for code splitting (link), flow-parser should correctly parse its syntax.

There's a PR to ESTree to specify this new syntax.

bradencanderson avatar Dec 07 '16 21:12 bradencanderson

Hi folks, Webpack2 is out now 🎉 ! Would really appreciate Flowtype not throwing Unexpected token import errors when using dynamic imports.

I've tried to add my own import declartion with

declare function import(module: string): Promise<Object>

, but Flow errors with Unexpected token import on this line as well.

kylpo avatar Jan 18 '17 22:01 kylpo

The PR to ESTree was merged 16 days ago. Whats the status of this?

jaredpalmer avatar Feb 15 '17 21:02 jaredpalmer

I don't think anyone has picked this up yet. Happy to review PRs!

jeffmo avatar Feb 15 '17 22:02 jeffmo

@jeffmo I'm mostly just throwing shit at walls with this PR. Any chance you can point me in the right direction?

deecewan avatar Mar 20 '17 22:03 deecewan