亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

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.?

不知什么情況?是不是什么配置不對,還是安裝出錯了。

正在回答

1 回答

H5 模式下編譯報錯?

如果出現類似?You may need an appropriate loader to handle this file type?的問題,如下:

./node_modules/[email protected]@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' // 全局引入一次即可

希望能幫到你!

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Taro多端框架開發外賣首頁
  • 參與學習       22910    人
  • 解答問題       92    個

Taro 一套代碼多端運行的框架,帶你掌握Taro開發基本語法,以及項目開發

進入課程

You may need an appropriate loader to handle this file type.

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號