facebook / facebook/flow

module.name_mapper to map absolute import paths no longer works

オープン
#3,189 コメント 5 件 リアクション 7 件 担当者 0 名 GitHub で見る
module resolution
主要言語
Rust
スター
22.3k
フォーク
1.9k
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。