Preface
Recently, I participated in an interview that made a deep impression on me. After many twists and turns, I finally got the offer. You can’t imagine what I went through.
- My interview process Interviewer:
Please tell me what happened when “npm run xxx”? The more detailed the better.
Me:
I thought to myself, “I’m ashamed. As a front-end developer, I use the npm run xxx command every day, such as npm run dev, npm run build, and so on. But I haven’t really understood what happened behind it.
Fortunately, I remember at least the following:
When we execute the “npm run xxx” command, it will first go to the project’s package.json file to find xxx in scripts, and then execute the xxx command.
For example, when you start a Vue.js project and execute npm run serve, you actually execute the vue-cli-service serve command.
Top comments (0)