选项module_mapper无法在同级项目上解析

时间:2018-11-27 17:48:16

标签: flowtype

我在项目中遇到模块解析问题,我在此仓库中重现了错误:https://github.com/melloc01/flowconfig-module_mapper,但它很简单,因此我将尝试解释:

目录结构如下:

> common/
   .flowconfig
    /core/
         service.js
    /modules/
         widget.js

> project_1
    .flowconfig
    app.js

具有以下流程配置:

常见

[options]
module.name_mapper='^core\/\(.*\)$' -> '<PROJECT_ROOT>/core/\1'

project_1

[options]
module.name_mapper='^core\/\(.*\)$' -> '<PROJECT_ROOT>/../common/core/\1'

common / modules / widget.js和project_1 / app.js都具有相同的源代码:

// @flow
import service from "core/service";

但是Flow在project_1上抛出错误,我遗漏了什么吗?

enter image description here

enter image description here

0 个答案:

没有答案