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

427
Visualizações
Disabling legacy View Engine compilation mode in Angular 12

Since Angular 10, we have had the following set in an angular library:

"angularCompilerOptions": {
  "enableIvy": false
}

I am now trying to use the Ivy compiler as we upgrade to Angular 12. From everything I've read, since Ivy is the default, either removing enableIvy or setting it to true should cause the build to use Ivy. However, with either of those changes, I still see:

Compiling with Angular in legacy View Engine compilation mode.

For comparison, I started a new library, and there I see:

Compiling with Angular sources in Ivy full compilation mode.

I can't figure out what else is different that is causing Angular to still use View Engine. What else should I be looking for?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Had the problem with Angular 12 and packagr and solved it in two steps:

  1. Enable ivy in the tsconfig.json:
"angularCompilerOptions": {
  "enableIvy": true,
  "compilationMode": "partial"
}

The compilationMode is relevant, when you want to publish your lib to any npm registry.

  1. Ensure, that the compiler sees and uses this tsconfig.json. It seems to me that the cli parameter for the config is madatory in Angular 12. I updated my scripts in package.json:
"packagr": "ng-packagr -p ./src/lib/package.json -c ./src/tsconfig.json"

The -c (or --config) part is missing in most examples.

over 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