Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

294
Views
How to use TurboRepo to rebuild apps that rely on a changed package (local)

I'm currently setting up TurboRepo alongside yarn workspaces and I'm having trouble getting it to rebuild our main app whenever one of the local packages it relies on changes.

Here is an example of my file structure:

├── apps                   
│   └── web
├── packages              
│   ├── assets                 
│   ├── config                 
│   ├── design-system          
│   ├── hooks                  
│   └── utils                  

Here is my turbo.json:

{
  "$schema": "https://turborepo.org/schema.json",
  "baseBranch": "origin/main",
  "pipeline": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": [".sst/**", ".build/**", ".expo/**"]
    }
  }
}

I would like to only rebuild packages/apps whenever they have changed in git, so I am using the --filter=[origin/main]. I made a small change to the hooks package and expected it to need to rebuild hooks, hooks dependencies, and web (because web has hooks as a dependency in its package.json). However, it only tries to rebuild hooks and hooks dependencies.

To test, I am experimenting with the following command: yarn turbo run build --filter=[origin/main] --dry-run

This prints out the following output:

@hlp/config#build
  Task          = build
  Package       = @hlp/config
  Hash          = 118d81f38208c721
  Directory     = packages\config
  Command       = <NONEXISTENT>
  Outputs       = .sst/**, .build/**, .expo/**
  Log File      = packages\config\.turbo\turbo-build.log
  Dependencies  =
  Dependendents = @hlp/hooks#build, @hlp/utils#build
@hlp/utils#build
  Task          = build
  Package       = @hlp/utils
  Hash          = 0c879c46fe4a9144
  Directory     = packages\utils
  Command       = <NONEXISTENT>
  Outputs       = .sst/**, .build/**, .expo/**
  Log File      = packages\utils\.turbo\turbo-build.log
  Dependencies  = @hlp/config#build
  Dependendents = @hlp/hooks#build
@hlp/hooks#build
  Task          = build
  Package       = @hlp/hooks
  Hash          = 4be940dedd5cc599
  Directory     = packages\hooks
  Command       = <NONEXISTENT>
  Outputs       = .sst/**, .build/**, .expo/**
  Log File      = packages\hooks\.turbo\turbo-build.log
  Dependencies  = @hlp/utils#build, @hlp/config#build
  Dependendents =

As you can see, it does not try to rebuild web. Is there any way to trigger web to rebuild since its dependency changed?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As stated in docs (https://turborepo.org/docs/core-concepts/filtering), you should be able to include dependents of matched packages by using ... prefix before query (e.g. --filter=...[origin/main])

# Build everything that depends on changes in branch 'my-feature'
turbo run build --filter=...[origin/my-feature]
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!