webpack icon indicating copy to clipboard operation
webpack copied to clipboard

Global imports in entry point

Open avxkim opened this issue 7 years ago • 0 comments

Entry points is: "src/main.js"

Placing bootstrap-vue imports here:

import BootstrapVue from 'bootstrap-vue'
import Vue from 'vue'

Vue.use(BootstrapVue)

Then in my other component's template, i'm trying to use bootstrap-vue's directives:

for example: <b-pagination size="md" :total-rows="10" v-model="currentPage" :per-page="2"></b-pagination>

Results an error about imports. But, if i place bootstrap-vue import in "src/App.vue" - it does work globally.

It's documented in bs-vue docs: https://bootstrap-vue.js.org/docs

image

By entry point, the meant - App.vue instead of main.js?

avxkim avatar Aug 23 '18 16:08 avxkim