facebook / facebook/flow

module.name_mapper to map absolute import paths no longer works

Đang mở
#3,189 5 bình luận 7 reaction 0 người được giao Xem trên GitHub
module resolution
Ngôn ngữ chính
Rust
Star
22.3k
Fork
1.9k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.