I'm currently importing a yarn workspace package that has the main
and module
field defined in the package.json
{
"name": "@mycompany/utils",
"version": "0.0.3",
"main": "dist/index.js",
"module": "src/index.js"
}
My create-react-app
setup automatically uses the module
through webpack but flow
is complaining that @mycompany/utils
package is undefined.
So my question is how do I
flow
to look at themodule
path instead ofmain
Edit: I realize I wasn't clear when I first asked the question
you could publish a flow version of your source as dist/index.js.flow
within this file, you can have export * from '../src/index.mjs'
;