How can I run multiple npm scripts in parallel?

后端 未结 22 2160
灰色年华
灰色年华 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条回答
  •  醉酒成梦
    2020-11-22 06:17

    In my case I have two projects, one was UI and the other was API, and both have their own script in their respective package.json files.

    So, here is what I did.

    npm run --prefix react start&  npm run --prefix express start&
    

提交回复
热议问题