Nuxt报错:vue-awesome-swiper/dist/ssr,swiper/dist/css/swiper.css未找到

  • Post author:
  • Post category:vue


  1. 修改nuxt.config.js如下:
  plugins: [
     { src: '~/plugins/nuxt-swiper-plugin.js', ssr: false }
   ],
 
   css: [
     'swiper/css/swiper.css'
   ]
  1. 修改nuxt-swiper-plugin.js如下:
 import Vue from 'vue'
 import VueAwesomeSwiper from 'vue-awesome-swiper/dist/vue-awesome-swiper.js'
 
 Vue.use(VueAwesomeSwiper)

ps:看来不能太相信文档,,,终于解决了。。。。。。



版权声明:本文为qq_38074535原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。