You may need an appropriate loader to handle this file type.
npm run dev:h5 命令报错了;
You may need an appropriate loader to handle this file type.
不知什么情况?是不是什么配置不对,还是安装出错了。
npm run dev:h5 命令报错了;
You may need an appropriate loader to handle this file type.
不知什么情况?是不是什么配置不对,还是安装出错了。
2019-03-17
如果出现类似 You may need an appropriate loader to handle this file type
的问题,如下:
./node_modules/_taro-ui@1.5.4@taro-ui/dist/h5/components/pagination/index.js 101
:11
Module parse failed: Unexpected token (101:11)
You may need an appropriate loader to handle this file type.
| };
|
> return <View className={classNames(rootClassName, classObject, this.props.
className)} style={customStyle}>
| <View className="at-pagination__operate">
| <View className="at-pagination__btns">
请在 config/index.js
文件中添加如下配置项:
h5: {
esnextModules: ['taro-ui']
}
另外:
// app.js
import 'taro-ui/dist/style/index.scss' // 全局引入一次即可
希望能帮到你!
举报