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

Respect and bake-in .flowconfig name_mapper settings #9

Open
gausie opened this issue Nov 30, 2017 · 1 comment
Open

Respect and bake-in .flowconfig name_mapper settings #9

gausie opened this issue Nov 30, 2017 · 1 comment

Comments

@gausie
Copy link

gausie commented Nov 30, 2017

If you use webpack or babel to (for example) import some png files into your project, you can then use name_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.

@Macil
Copy link
Owner

Macil commented Aug 28, 2018

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.)

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

2 participants