facebook / facebook/flow

module.name_mapper to map absolute import paths no longer works

Aberta
#3,189 5 comentários 7 reações 0 responsáveis Ver no GitHub
module resolution
Linguagem predominante
Rust
Estrelas
22.3k
Forks
1.9k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

This .flowconfig:

```
[options]
module.system=haste
module.name_mapper='^\/\(.*\)$' -> '/src/\1'
```

used to make imports like this work:

`import Header from '/components/Header'`

Now the above setup results in errors:

```
src/components/App.jsx:5
5: import Header from '/components/Header'
^^^^^^^^^^^^^^^^^^^^ /components/Header. Required module not found

Found 1 error
```

Changing the prefix away from `/` to anything else results in the same error.

Also, in order to debug this more, is there any way to ask Flow to be more verbose about exactly where it's looking for modules?

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.