Closed davidkobielski closed 2 years ago
When application is in development mode tiny slider works perfectly, but when I want to build my app it doesn't work. Above is my code. A did everything the same as it is in the readme file.
My component
<client-only> <vue-tiny-slider v-bind='tinySliderOptions'> <Product v-for='product in products' :key='product.id' :product="{url: '...', alt: '...', name: product.name, images: getImages(product.images), price: product.regular_price}"/> </vue-tiny-slider> </client-only>
plugins/vue-tiny-slider.js
import Vue from "vue"; import vTinySlider from "vue-tiny-slider"; const VueTinySlider = { install(Vue, options) { Vue.component("vue-tiny-slider", vTinySlider); } }; Vue.use(VueTinySlider); export default VueTinySlider;
nuxt.config.js
{ src: "~/plugins/vue-tiny-slider.js", mode: 'client' }
Nvm, I'm just stupid. I didnt import tiny-slider's css styles.
When application is in development mode tiny slider works perfectly, but when I want to build my app it doesn't work. Above is my code. A did everything the same as it is in the readme file.
My component
plugins/vue-tiny-slider.js
nuxt.config.js