问答详情
源自:-

引用taro-ui时报错

只有在父中引用<Foof/>时,编译就会报错如下。文档要求加的H5配置也加了。


Failed to compile.

./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">


https://img3.mukewang.com/5c4680130001d8c405690561.jpg

提问者:街长 2019-01-22 10:29

个回答

  • 慕粉2499218
    2019-04-30 13:23:52

    请问楼主怎么解决的,我也是这样的错误,百度了很多,都是说修改h5配置,但是并没有卵用

  • qq_慕勒0509738
    2019-04-01 21:03:54

    D:/node_modules/_taro-ui@2.0.2@taro-ui/dist/h5/index.js

    Module build failed (from ./node_modules/babel-loader/lib/index.js):

    ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "base" at 5, attempted to resolve relative to "D:\\node_modules\\_taro-ui@2.0.2@taro-ui\\dist\\h5"

        at Array.map (<anonymous>)

    配置完之后还是有这样的错误

  • 街长
    2019-01-22 10:39:31

    从1.5.2已经修复不是已经修复了吗?