Parcel is currently not able to consume flow typed modules
N/A
Flow types should be stripped (perhaps configurable through babel)
Flow types cause errors
.flow and .js files. .flow being the typed one and .js being processed by babel to strip away the typingsIssue #1799
import Typography from 'typography';
cc @chiefGui
So I think we can just automatically detect flow and apply the babel plugin by looking at the first line as it should say: // @flow?
Another possible solution:
If we can detect a module that contains flow types (in order to locally link it), wouldn't be less-workaroundish to make parcel apply the transform right away, exclusively against that module?
Yeah I think that'll be the best approach @chiefGui , currently doing some research on flow to make sure the annotation on the first line is really required. So I don't make assumptions of a framework I've never used
Don鈥檛 forget to mention @flow on top of file, otherwise flow won鈥檛 report errors.
Also from the short period of time I've worked with Flow, I also do remember that I was required to annotate my files with @flow.
Finally, seems like in the Typography's case, they're also consistently using @flow (though I know one library isn't enough to say anything.).
This is just a support to help you on your research.