unused-files-webpack-plugin
unused-files-webpack-plugin copied to clipboard
Support Flow type imports
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!
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.
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.
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