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

150
Views
Angular 12: después de la actualización, se insertó un bloque de estilo CSS antes de styles.css (bootstrap ??) está rompiendo la capacidad de respuesta

Después de actualizar a Angular 12 (12.2.1) desde 11, obtengo un bloque de estilo inyectado justo antes del enlace de mi hoja de estilo

 <style> @charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Open+Sans); :root{ --blue:#007bff; --a bunch of color variables -- line-height:1.5;color:#212529; text-align:left;background-color:#fff;} img{border-style:none;} img{vertical-align:middle;} img{page-break-inside:avoid;} @page {size:a3;} body{min-width:992px!important;} </style> <link rel="stylesheet" href="styles.645853d3825cd77dedab.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.645853d3825cd77dedab.css"></noscript> </head>

Esa última línea (cuerpo) está rompiendo la capacidad de respuesta de mis páginas.

Esto es solo en ng build, no aparece localmente en ng serve. No puedo averiguar de dónde viene o qué módulo es el responsable de hacer esta inyección. Estoy usando ng-bootstrap 10, pero cambiarlo a una versión anterior no afecta el bloque de código anterior.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Corregido con la respuesta aquí: https://stackoverflow.com/a/67582075/382281

simplemente agregue inclineCritical: false a su archivo angular.json la compilación particular.

 "optimization": { "scripts": true, "styles": { "minify": true, "inlineCritical": false } },
about 4 years ago · Juan Pablo Isaza 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!