Run Dev Scripts for All Packages Simultaniously

Share this video with your friends

Send Tweet

Right now, it is not possible to run all the Dev Scripts across all the packages of the monorepo at the same time, because once we run npm run dev with the -ws flag, we will run the dev-command in the block first, but that command never ends. It is always watching for changes.

In order to run the dev scripts across all the packages in the monorepo, the first thing that we have to do, is to create a dev command for each one of the packages in the root package.json file. Then we can use concurrently to change them. We go concurrently and we tell it to run the utils, then the blog and then the dashboard scripts.

Pavel Klochkov
~ 2 years ago

Hey. You can simplify and make universal the dev script. "dev": "concurrently "npm run dev:*"".

~ a year ago

more simplify is: "dev": "concurrently npm:dev:*"