【发布时间】:2016-01-28 23:23:30
【问题描述】:
当我导入 AsyncStorage 模块(用于 redux-storage)时,我收到以下错误:
ERROR in ./~/react-native/Libraries/react-native/react-native.js
Module parse failed: ~/node_modules/react-native/Libraries/react-native/react-native.js Line 112: Unexpected token ...
You may need an appropriate loader to handle this file type.
| // Note: this must be placed last to prevent eager
| // evaluation of the getter-wrapped submodules above
| ...require('React'),
| };
我的 .babelrc 扩展了 react-native 的:
"extends": "react-native/packager/react-packager/.babelrc"
我已尝试重新安装本机库,但没有帮助。
我正在使用这个 github 入门工具包https://github.com/este/este
已经检查过 webpack 配置,就像这个问题所建议的那样,它与 https://github.com/facebook/react-native/commit/f9b744d50137de25357994fe2e829f98104e2242 相同
【问题讨论】:
标签: javascript reactjs react-native babeljs redux