{"record":{"id":"bf9558c24d9848d1","repo":"angular/angular-cli","slug":"error","errorCode":null,"errorMessage":"*","messagePattern":"\\*","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/angular/ssr/src/utils/inline-critical-css.ts","lineNumber":106,"sourceCode":"// the `Beasties` types which means that we can't call the `super` implementation.\ninterface BeastiesBase {\n  embedLinkedStylesheet(link: PartialHTMLElement, document: PartialDocument): Promise<unknown>;\n}\nclass BeastiesBase extends Beasties {}\n/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */\n\nexport class InlineCriticalCssProcessor extends BeastiesBase {\n  private addedCspScriptsDocuments = new WeakSet<PartialDocument>();\n  private documentNonces = new WeakMap<PartialDocument, string | null>();\n\n  constructor(\n    public override readFile: (path: string) => Promise<string>,\n    readonly outputPath?: string,\n  ) {\n    super({\n      logger: {\n        // eslint-disable-next-line no-console\n        warn: (s: string) => console.warn(s),\n        // eslint-disable-next-line no-console\n        error: (s: string) => console.error(s),\n        info: () => {},\n      },\n      logLevel: 'warn',\n      path: outputPath,\n      publicPath: undefined,\n      compress: false,\n      pruneSource: false,\n      reduceInlineStyles: false,\n      mergeStylesheets: false,\n      // Note: if `preload` changes to anything other than `media`, the logic in\n      // `embedLinkedStylesheet` will have to be updated.\n      preload: 'media',\n      noscriptFallback: true,\n      inlineFonts: true,\n    });\n  }","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular/ssr/src/utils/inline-critical-css.ts#L88-L124","documentation":"During SSR HTML rendering, the CLI/server may inline critical CSS using Critters. Critters' internal logger is bridged to `console.warn`/`console.error`, so any Critters warning (message shown as `\"*\"` placeholder here) surfaces as a raw console warning while inlining critical CSS.","triggerScenarios":"Server-side rendering a page with stylesheets when the Critters `InlineCriticalCssProcessor` encounters issues such as unresolvable stylesheet paths, malformed CSS, or missing files relative to `outputPath`.","commonSituations":"Missing or renamed CSS assets after a build, custom `outputPath` mismatch, inline styles Critters cannot analyze, or fonts/imports Critters can't inline.","solutions":["Read the accompanying console.warn text to identify the specific CSS asset/CSS rule Critters complained about.","Rebuild so CSS assets match `outputPath`, and verify referenced stylesheets exist in the server output.","If the warning is benign (e.g. non-critical font), adjust inline-critical-css options or disable inlining for that route."],"exampleFix":"// before (server config)\ninlineCriticalCss: true // with mismatched outputPath\n// after\n// ensure outputPath points at the browser build output directory containing the CSS\ninlineCriticalCss: true, outputPath: 'dist/my-app/browser'","handlingStrategy":"fallback","validationCode":"// verify CSS assets exist where outputPath points before SSR render\nimport { existsSync } from 'fs';\nif (outputPath && !existsSync(outputPath)) console.warn('inline-critical-css outputPath missing; CSS warnings likely');","typeGuard":null,"tryCatchPattern":"// bridge Critters warnings into app logs for visibility\nconsole.warn = ((orig) => (s) => { logSsrWarning(s); orig(s); })(console.warn);","preventionTips":["Keep `outputPath` pointing at the directory containing built CSS.","Rebuild assets after CSS changes before SSR smoke tests.","Review Critters warnings in CI SSR render checks instead of ignoring console output."],"tags":["css","ssr","critters","build"],"backgroundTag":"critical-css-inline-warning","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}