How can I run multiple npm scripts in parallel?

后端 未结 22 2173
灰色年华
灰色年华 2020-11-22 05:48

In my package.json I have these two scripts:

  \"scripts\": {
    \"start-watch\": \"nodemon run-babel index.js\",
    \"wp-server\": \"webpack-         


        
22条回答
  •  -上瘾入骨i
    2020-11-22 06:11

    Just add this npm script to the package.json file in the root folder.

    {
      ...
      "scripts": {
        ...
        "start": "react-scripts start", // or whatever else depends on your project
        "dev": "(cd server && npm run start) & (cd ../client && npm run start)"
      }
    }
    

提交回复
热议问题