[Vuejs]-Rollup, VueJS, install Vue Portal

0👍

You don’t need a rollup plugin to use PortalVue.

Vue.use(PortalVue) should go in the entry point file, where you setup the root Vue instance (e.g., main.js, index.js, app.js, etc.).

For example:

// main.js
import Vue from 'vue'
import App from './App.vue'
import PortalVue from 'portal-vue'

Vue.use(PortalVue)

new Vue({
  render: h => h(App)
}).$mount('#app')

Leave a comment