I am using vutify with nuxt
I want to add a product zoom plugin in my vuetify application
https://github.com/akulubala/vue-product-zoomer
They showed in order to use the feature you need to add this following.
import ProductZoomer from 'vue-product-zoomer'
Vue.use(ProductZoomer)
where can i find Vue.use
in my application file in vuetify
CodePudding user response:
Follow this steps:
- Add
plugins
folder in root directory of your nuxt project. - In this directory, create new file called
vue-product-zoomer.js
. - Add following codes in this file:
import Vue from "vue"
import ProductZoomer from 'vue-product-zoomer'
Vue.use(ProductZoomer)
- In
nuxt.config.js
file add following line toplugins
array:
export default {
// ...
plugins: [
...
{ src: '~/plugins/vue-product-zoomer.js', mode: 'client' },
],
// ...
}
After doing above steps, you can access this plugins globally through your nuxt app.