.flowconfig default filename if none provided in name_mapper
- Vorherrschende Sprache
- Rust
- Sterne
- 22.3k
- Forks
- 1.9k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
We're using webpack aliases, and modified our .flowconfig to match.
The name_mapper doesn't seem to have the ability to default to a specific file, like index.js if no filename is provided. E.G.
`module.name_mapper='^Modules\/\(.*\)$' -> '/src/modules/\1'`
If I have an index.js in /src/modules, ideally I would just be able to have my import like so:
`import { MenuBlock, OrderSummaryView } from 'Modules';`
This results in a flow error. I'd like to have the name_mapper infer that it should look for a default file I specify in name_mapper when none is provided so I don't have to use `'Modules/index'` in my import, but also retain the ability to specify specific files.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.