Answer the question
In order to leave comments, you need to log in
Where is the best place to include Bootstrap styles in a Vuejs project?
I create a project using Vue CLI
Install Bootstrap using npm
Now I include styles in the App.vue root component in the section<script>
import 'bootstrap/dist/css/bootstrap.min.css'
export default {...}
import { createApp } from 'vue'
import App from './App.vue'
import 'bootstrap/dist/css/bootstrap.min.css'
createApp(App).mount('#app')
Answer the question
In order to leave comments, you need to log in
There is practically no difference.
This is a question about the number of such connections. I generally make a separate module, call it cssImports.js and there I connect all third-party libraries in a comment column and import it into main.js
import '../imports/cssImports.js';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question