install bootstrap on vuejs project code example

Example 1: install bootstrap vue

npm install vue bootstrap bootstrap-vue
//then in main file

import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'

// Import Bootstrap an BootstrapVue CSS files (order is important)
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'

// Make BootstrapVue available throughout your project
Vue.use(BootstrapVue)
// Optionally install the BootstrapVue icon components plugin
Vue.use(IconsPlugin)

Example 2: install bootstrap vue

//for vue 3(in theory)

cd [project-name]
vue add bootstrap-vue
//in vue 3, when running 'npm run serve' gives 4 warnings and the preview doesn't show up
//in vue 2 it works fine