Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular noscript Style Loading

Tags:

angular

since Angular 12 Angular does render the following to load Stylesheet Files:

< link rel="stylesheet" href="styles.4285903a79a25b170478.css" media="print" onload="this.media='all'">
< noscript>< link rel="stylesheet" href="styles.4285903a79a25b170478.css"></ noscript>

Is that correct?

If this is correct, how can i disable this? My Application does look really wired when the Internet connection is bad the first couple seconds.

like image 729
Daniel Ehrhardt Avatar asked Dec 18 '25 19:12

Daniel Ehrhardt


1 Answers

This can be controlled by the following angular.json config:

"optimization": {
  "scripts": true,
  "styles": {
    "minify": true,
    "inlineCritical": false
  },
  "fonts": true
}
like image 94
Daniel Ehrhardt Avatar answered Dec 20 '25 15:12

Daniel Ehrhardt