You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I have a problem with flow checking one of my webpack alias.
So i have something like: config.resolve.alias['react-myLib'] = myLib/rslds/src
or config.resolve.alias['react-myLib'] = myLib/rslds/lib
depending on env variable.
So i do imports inside my component files like this: import { TableComponent } from 'react-myLib';
It is working fine but flow giving me an error: Cannot resolve module react-myLib.
So i tried do this inside my .flowConfig: module.name_mapper='^react-myLib\/\(.*\)$' -> 'empty/object'
but that didn't help.
I tried different regex and solutions but nothing worked for me.
Someone have an idea how to fix it ?
The text was updated successfully, but these errors were encountered:
With module.name_mapper there are no builtin functions of objects. You're basically telling flow to redirect imports from one place to resolve from another. In your case, you're saying resolve from a library called empty instead of react-myLib. Do you have empty installed?
Hello. I have a problem with flow checking one of my webpack alias.
So i have something like:
config.resolve.alias['react-myLib'] = myLib/rslds/src
or
config.resolve.alias['react-myLib'] = myLib/rslds/lib
depending on env variable.
So i do imports inside my component files like this:
import { TableComponent } from 'react-myLib';
It is working fine but flow giving me an error:
Cannot resolve module react-myLib.
So i tried do this inside my .flowConfig:
module.name_mapper='^react-myLib\/\(.*\)$' -> 'empty/object'
but that didn't help.
I tried different regex and solutions but nothing worked for me.
Someone have an idea how to fix it ?
The text was updated successfully, but these errors were encountered: