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

132
Visualizações
What does the production property do in environment.ts?

In an Angular project's environment files, what happens when the production property is set to true vs when it's set to false?

We have multiple prod environment files - each is used for a different region. I noticed one of their production properties is set to false, even though it's a prod environment file. Does this make the binaries larger, among other bad stuff for prod builds?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The production property is just there so that you can look at environment.production and write debug code when it is false. It will not have any affect on your build or code unless you have lines your code that check for that flag. Your environment file in general is more of a config file that you can use for your own use cases. Angular picks a different environment file based on your build parameters and your configurations in your angular.json file.

check this out: https://angular.io/guide/build and also take a look at the Configure target-specific file replacements section.

Basically if you have a environment.staging.ts and a configuration for staging in your angular.json file, you can run ng build --configuration=staging to use those variables for that build.

about 4 years ago · Juan Pablo Isaza 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