Home >Web Front-end >Front-end Q&A >Does vuejs have to install nodejs?

Does vuejs have to install nodejs?

青灯夜游
青灯夜游Original
2021-09-28 14:25:3313918browse

vuejs does not have to be installed with nodejs. There are two ways to use Vue: 1. Use vue-cli to build a vue project, in which case nodejs is needed; 2. Create an html file and use the script tag to introduce the "vue.js" file in the document, so that you don't need to To node, there is no need to install it.

Does vuejs have to install nodejs?

The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.

Do I need to install node.js to use Vue.js?

To be precise, nodejs is required when using vue-cli to build a project. You can also create a .html file and then introduce Vue in the following way. You can also use Vue.

<!-- 开发环境版本,包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

But it is more convenient to use node. Package and deploy, parse vue single file components, parse each vue module, put them together, etc., start the test server localhost, and help you manage vue-router, vue-resource these plug-ins. So usually we will use Vue node method, which is convenient and saves trouble.

vue recommended development environment

Node.js: javascript running environment (runtime), different systems directly run various programming languages

npm: Nodejs package manager under. Since using npm in China will be very slow, it is recommended to use Taobao NPM mirror (http://npm.taobao.org/)

webpack: Its main purpose is to publish all browser-side needs through CommonJS syntax. Make corresponding preparations for static resources, such as merging and packaging resources.

vue-cli: User-generated Vue project template

Related recommendations: "vue.js Tutorial"

The above is the detailed content of Does vuejs have to install nodejs?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn