Skip to content

Broken path resolution for styles on dev-server when using outputHashing option #28711

@vladzavadsky

Description

@vladzavadsky

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

^18.0.0

Description

After update to v19, FOUC was noticed, which only happens when using @angular-devkit/build-angular:dev-server and is not reproduced on a production build. FOUC is also visible when "outputHashing": "none" is used, but with no errors in the console.

Minimal Reproduction

  1. Create a new project with ng new <app-name> using @next version of @angular/cli
  2. Add "outputHashing": "all" in angular.json
  3. Start an application with npm run start
  4. Open browser's console to see an error

Exception or Error

Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Your Environment

Node: 22.2.0
Package Manager: npm 10.8.1
OS: darwin arm64

Angular: 19.0.0-next.11
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.0-next.13
@angular-devkit/build-angular   19.0.0-next.13
@angular-devkit/core            19.0.0-next.13
@angular-devkit/schematics      19.0.0-next.13
@angular/cli                    19.0.0-next.13
@angular/ssr                    19.0.0-next.13
@schematics/angular             19.0.0-next.13
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions