Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

295
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda