Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Flow type imports #19

Open
elliotdavies opened this issue Jan 26, 2018 · 3 comments
Open

Support Flow type imports #19

elliotdavies opened this issue Jan 26, 2018 · 3 comments

Comments

@elliotdavies
Copy link

Hello,

I was wondering what it would take to support the import type { MyType } from './myFile' syntax used by Flow. I have a couple of files that show up as warnings because they're only used for type rather than value exports.

If you could point me in the right direction then I'd be happy to attempt a PR.

Many thanks!

@tomchentw
Copy link
Owner

That'd be awesome, but this plugin relies on webpack to parse the dependencies of a file. Unless webpack supports FlowType natively, we won't be able to parse the files without introducing 3rd parser like babylon.

@elliotdavies
Copy link
Author

Ah... So Webpack never actually sees the Flow-only files, because they're only parsed by Flow itself (and then in my case the annotations are removed by Babel)? That's annoying.

@xiayuxiaoyan
Copy link

How about ts? In my mind ts is handled by ts-loader. so can this loader handle after ts-loader and analyse the interface.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants