使用 concurrently 并行地运行多个命令【解决同时运行前端开发环境和接口模拟(api-mock)】

背景

===待补充===

安装

npm i concurrently --save-dev

更改package.json中的scripts

"scripts": {
   "start": "react-scripts start",
   "build": "react-scripts build",
   "test": "react-scripts test --env=jsdom",
   "eject": "react-scripts eject",
   "server": "npm start --prefix backend",
   "dev": "concurrently \"npm run server\" \"npm run start\""
},

你可能感兴趣的:(使用 concurrently 并行地运行多个命令【解决同时运行前端开发环境和接口模拟(api-mock)】)