Open gausie opened 6 years ago
Assuming you are using flow-copy-source to generate .flow files before publishing to npm: ignoring Flow, does the consumer of your module have to configure anything specially to deal with the png
imports in your code? For example, does your module require the consumer to configure webpack in a specific way to allow png
imports? (In this case, it seems like it's not much more to ask them to edit their .flowconfig file too.) Or does your compilation process remove the png
imports before publishing to npm? (In this case, it seems natural that flow-copy-source or something else performs a similar operation on the .flow files too.)
If you use webpack or babel to (for example)
import
somepng
files into your project, you can then usename_mapper
in your.flowconfig
so Flow better understands what's going on.It would be great if
flow-copy-source
could replace image imports with an import of the mapped stub when generating.js.flow
files.