The differences between importing vue.js and installing are: 1. You can directly introduce vue.js in HTML, which is faster; 2. Using npm to install Vue can facilitate package management; 3. Directly using Vue commands will Using webpack tools, creating projects, and front-end build tools will make front-end development more efficient.
The operating environment of this tutorial: windows7 system, vue2.0 version, Dell G3 computer.
Related recommendations: "vue.js Tutorial"
What is the difference between directly quoting vue.js in HTML and npm installation?
First use npm to install Vue and introduce vue.js directly into HTML. Both methods can use vue.js.
The difference is that using npm to install Vue can facilitate package management. When the application requires more and more front-end libraries and front-end frameworks, it will be very inconvenient to introduce them one by one in the HTML file.
Then use the Vue command directly, and use the webpack tool to create the project. The front-end build tool will make front-end development more efficient.
Introduction to npm
npm (full name Node Package Manager, "node package manager") is Nodejs's default software package management system written in JavaScript. npm can be used to install, share, distribute code, and manage project dependencies.
The above is the detailed content of What is the difference between importing vue.js and installing it?. For more information, please follow other related articles on the PHP Chinese website!