【发布时间】:2016-07-11 01:14:34
【问题描述】:
我发现很难设置使用 React+Flux 和 Flowtype 的项目。
这是我的.flowconfig 拥有的:
[ignore]
.*/node_modules/.*
static/.*
[options]
module.name_mapper='^core/\(.*\)' -> '<PROJECT_ROOT>/core/\1'
这是一些文件
/* @flow */
import Dispatcher from 'flux';
import Action from 'core/Action';
const AppDispatcher: Dispatcher<Action> = new Dispatcher();
export default AppDispatcher;
但是当我尝试运行 flow check 时,我收到了:
core/Dispatcher.js:2
2: import Dispatcher from 'flux';
^^^^^^ flux. Required module not found
谁能分享他们建立项目的成功经验?
谢谢。
【问题讨论】: