What you are looking at is my webpack react seed project code written by imitating kriasoft.
The meaning of this code is to use babel-node to call the run.js script file in the tools directory. The run.js script file calls all build tasks (including functions such as logging), and the last parameter is start. Represents the task of directly calling tools/start.js. The start task is to start the dev server and implement the hot loading function.
The npm start command executes the code you wrote in start. For example, if you want to use npm start to run a Nodejs service file, you can change it to start: "node server", which is the same as running node server
It looks like
tools/run
应该是主脚本,那么start
should be the parameter of this scriptOh, sorry for the late reply.
What you are looking at is my webpack react seed project code written by imitating kriasoft.
The meaning of this code is to use babel-node to call the run.js script file in the tools directory. The run.js script file calls all build tasks (including functions such as logging), and the last parameter is start. Represents the task of directly calling tools/start.js. The start task is to start the dev server and implement the hot loading function.
This should be React Starter Kit?
The command will first call tools/run.js, then tools/start.js, and then tools/webpack.config.js
The npm start command executes the code you wrote in start. For example, if you want to use npm start to run a Nodejs service file, you can change it to start: "node server", which is the same as running node server