Taro next Vue引入vant



  • Taro next Vue开发如何引入vant组件库,尝试将vant组件库放入components目录下,vue文件中导入相关组件,失败?



  • Hello.vue文件按如下方式引入:
    import Panel from '@/components/vant/lib/pannel'
    import Image from '@/components/vant/lib/image'

    同时,vant库已复制到components文件夹下,如下所示:
    Lark20200717-204338.png

    运用taro build --type h5,报错如下:
    Module not found: Can't resolve '@/components/vant/lib/pannel/index' in 'xxx路径'


登录后回复