npm script可以通过 &&
串行,&
并行执行两个任务,但是不能在同个打开的终端中运行两个项目,可以通过concurrently
包解决
安装
npm i concurrently -D
script命令
"dev":"concurrently \"npm run start\" \"nodemon ./index.js\" "
npm script可以通过 &&
串行,&
并行执行两个任务,但是不能在同个打开的终端中运行两个项目,可以通过concurrently
包解决
安装
npm i concurrently -D
script命令
"dev":"concurrently \"npm run start\" \"nodemon ./index.js\" "