【发布时间】:2017-03-10 11:54:11
【问题描述】:
我在 Flow 项目中添加了模块 highcharts,因为它写在 here 上。基本上问题是,每当我使用库 Highcharts 时,我必须输入代码 import Highcharts from "highcharts"; 结果结果在 FlowJs 界面中没有错误,但在浏览器中出现错误 Unexpected token import(所以它不能正确编译 js 文件) .有人知道答案吗?我将不胜感激!
【问题讨论】:
-
您需要一个捆绑器才能拥有导入/导出模块的能力。您可以尝试webpack 或其他流行的打包工具,例如 browserify 或 systemjs。
标签: highcharts flowtype