I import he vue-awesome-swiper/ssr in app.js and use it with Vue.use.
But, when I use swiper in a components throw a exception that window is not defined
So... I make some mistake? How can I use with SSR... Thx~
import Vue from 'vue'
// You need to make sure that you are introducing it in a browser build environment
if (process.BROWSER_BUILD) {
const VueAwesomeSwiper = require('vue-awesome-swiper/ssr')
Vue.use(VueAwesomeSwiper)
}
@surmon-china I know what should I do and I appreciate that you can reply for me.
i have the same quetion . can you tell me what should i do?
Most helpful comment