vue

npm run serve vs npm run dev in vuejs


In this guide, you will understand the driving mechanisms behind the two commands npm run serve vs npm run dev in vuejs

npm run serve is basically asking the package manager (npm) to run the command specified under the name serve in the package.json file.

The same goes for the npm run dev command. It is possible that both execute the same command or different things. The scripts section in the package.json houses these commands.

"scripts": {
    "serve": "[commands to run here]",
    "dev": "[commands to run here"
},


Share on social media

//