6

I have following scenario:

/apps
    /api
    /web
/packages
    /shared

api and web have a dependency on shared. They are both installed with workspace: * using pnpm.

My turbo.json looks like this:

{
  "$schema": "https://turborepo.org/schema.json",
  "pipeline": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["build/**", ".output/**"]
    },
    "dev": {
      "cache": false,
    },
  }
}

All have a dev script which starts up a watcher and hotreload. But the issue is that when I want to run turbo run dev, api fails to start because shared isn't launched yet.

Is there a way to set priority to shared?

I can't use dependsOn because then it waits on the dev script on shared to finish, which it doesn't because its a watcher.

JC97
  • 1,530
  • 2
  • 23
  • 44

1 Answers1

1

Hi i was fetching similer problem, after some searching i found out You can use --parallel flag like this turbo run dev --parallel

Kousher Alam
  • 1,005
  • 1
  • 15
  • 30