T
T
Top_Pudge2017-08-11 17:23:45
webpack
Top_Pudge, 2017-08-11 17:23:45

How to include bootstrap downloaded from npm in a vue-cli webpack project?

Created a project with vue-cli webpack. I don’t know Webpack well (and I doubt that I will know well with such and such documentation). Please tell me how to include styles in the main app.vue component. Under the idea in the script block, you need to write import bs from bootsrtap, and then I don’t know.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-08-11
@Top_Pudge

Just import the files in main.js like so:

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

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'

Vue.use(BootstrapVue);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question