I am using Flow: Static type checking library for react front end application, it throws "cannot resolve" for internal imports from src directory:
Example in file at path: src/abc/def/ghi/hello.jsx, I am using the following import:
import words from '../words';
--> Throws error "Cannot resolve module ../words
words.js is in src/abc/def dir
EDITED: My .flowconfig looks like this after I installed flow-typed:
[ignore]
.*/node_modules/.*
.*/build/.*
.*/dist/.*
[include]
.*/src/.*
.*/test/.*
[libs]
flow-typed
[lints]
[options]
all=true
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=src
[strict]
How do I map flow for such imports in .flowconfig file ?
Thanks in advance.
import {words}
– Scaler