Summary of differences between npm run dev and npm run serve
1. Analyze the npm run
npm
npm is the Node.js package manager that allows you to install, update, delete, and manage Node.js modules and applications.
run
run is a subcommand of npm that executes the scripts defined in the scripts section of the package.json file.
dev
dev is the name of a script command defined in the scripts section of the package.json file. In general, the name dev is short for development environment, meaning that this command is typically used to start the development server or perform development-related tasks.
To summarize: in a Vue.js project, npm run dev might actually execute the command vue-cli-service serve
2. Difference between dev and serve
In fact, the script defined in the scripts section of the package.json file is different
This article about the difference between npm run dev and npm run serve is introduced to this, more about the difference between npm run dev and npm run serve please search the previous articles of Script Home or continue to browse the following related articles hope that you will support Script home in the future!
Related article
-
Explain how to use Express to host static files
This article mainly introduces the method of using Express to host static files in detail, Xiaobian feel very good, now share to you, also give you a reference. Let's take a look2017-09-09 -
node simply implements an example of changing avatars
This article mainly introduces the node simple implementation of a change profile picture function example, Xiaobian feel very good, now share with you, also give you a reference. Let's take a look2017-12-12 -
Implementation of Node periodic backup MySQL
This article mainly introduces the implementation of Node timing backup MySQL, the article through the example code is very detailed, for everyone's study or work has a certain reference learning value, the need of friends below with the small series to learn together2023-04-04 -
How to implement static file caching with node
HTTP caching mechanism as an important means of Web application performance optimization, for engaging in the Web Development students, it should be the foundation of the knowledge system, but also want to become the front-end architecture of the necessary skills, this article mainly introduces you about how to use node to achieve static file caching related information, need friends can refer to it2021-07-07 -
Set up an HTTP server locally using node.js
This article mainly introduces in detail the relevant information about using node.js to build an HTTP server locally, which has certain reference value, and interested partners can refer to it2017-04-04 -
Method of adding travis ci Continuous integration tool to Koa2 in Node.js environment
This article mainly introduces the method of adding travis ci continuous integration tool to Koa2 in the Node.js environment. The article is very detailed and has certain reference and learning value for everyone. The friends who need to follow Xiaobian together to learn it.2017-06-06 -
Install nodejs in binary mode on linux
This article mainly introduces linux in a binary way to install nodejs, the article gives you a very detailed introduction, has a certain reference value, the need of friends can refer to2020-02-02 -
Express framework to customize routing instance analysis
This article mainly introduces the Express custom routing, combined with the example form analysis of the express framework custom routing principle, usage and related precautions, the need of friends can refer to2023-05-05 -
In Linux system, node.js is used to extract Word(doc/docx) and PDF text content
This article mainly introduces you about the Linux system using node.js to extract Word(doc/docx) and PDF text content, the article gives a detailed example code for your reference to learn, the need for friends following the small series to take a look at it.2017-06-06 -
Description node operations on the mysql database example
This article mainly introduces the node operation mysql database, combined with examples of the form of a more detailed analysis of node operation database connection, add, delete, modify, transaction processing and error handling related operation skills, need friends can refer to2017-03-03
Latest comments