I'm using Vue JS for the first time.
I downloaded all dependencies through npm, including VUE itself.
I have the following questions:
- In order to view the changes in css, do I need to do a build?
- How do I import a css library through the vue?
I'm using Vue JS for the first time.
I downloaded all dependencies through npm, including VUE itself.
I have the following questions:
1 - No, you do not need to build, build is for when your application is ready and you want the files to send to production, you can read more about here . For you to run the project and view your changes, give the following command at the prompt: npm run dev
, after this command and if the files do not contain errors, your application will be able to be viewed by typing in any browser Your preference is the following localhost:8080
address, to learn more read here .
2 - To install any library, framework, or any other type of dependency in the project you can install through command at the prompt, eg install bootstrap run the following command: npm install bootstrap
and import it usually into the index.js
file in the router folder to be available throughout the application with the following command: import Bootstrap from 'bootstrap' and import 'bootstrap / dist / bootstrap.min.css' to use Bootstrap's CSS, plus the command: Vue.use Bootstrap) , getting something like this:
import Bootstrap from 'bootstrap'
import 'bootstrap/dist/bootstrap.min.css'
Vue.use(Bootstrap)