Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

290
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda