A
A
Alexander Sharomet2019-10-17 11:44:22
JavaScript
Alexander Sharomet, 2019-10-17 11:44:22

Why is the plugin not loading in nuxt?

Hello.
Installed npm plugin i vue-sidebar-menu
Added it to plugins folder
plugins/vue-sidebar-menu.js :

import Vue from 'vue'
import * as VueSidebarMenu from 'vue-sidebar-menu'
Vue.use(VueSidebarMenu)

Connected in nuxt.config.js:
plugins: [
    '~plugins/vue-sidebar-menu'
  ],
build: {
    transpile: ['vue-sidebar-menu'],
}

Nothing works with this configuration.
There are no errors, just like the page is loaded and that's it.
I added it to the component like this:
<script>
import { SidebarMenu } from 'vue-sidebar-menu'
export default {
components: {
        SidebarMenu
    },
}
</script>

But still nothing is loading.
What could be the problem? Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question