欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

(转)Cannot resolve “swiper/dist/css/swiper.css” from “项目路径\swiper\dist\css\swiper.css”

程序员文章站 2022-07-15 12:46:21
...
  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)

转载自:https://blog.csdn.net/qq_38074535/article/details/105358446

相关标签: Vue