Skip to content

SSR Text Loader Resolves To Wrong Result #29235

Closed
@Char2sGu

Description

@Char2sGu

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

No response

Description

With the following loader configuration:

            "loader": {
              ".svg": "text"
            }

When importing the following asset on server:

import icon from '@material-symbols/svg-500/outlined/add.svg';

The asset is resolved to a path /@fs/home/char2s/projects/issue-ssr-dev-loader/node_modules/@material-symbols/svg-500/outlined/add.svg instead of the text content of the asset.

The loader works correctly on browser or for local assets (not in node_modules)

Minimal Reproduction

See https://github.com/Char2sGu/issue-ssr-dev-loader/

Exception or Error


Your Environment

Angular CLI: 19.0.6
Node: 22.3.0
Package Manager: npm 10.8.1
OS: linux x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.6
@angular-devkit/build-angular   19.0.6
@angular-devkit/core            19.0.6
@angular-devkit/schematics      19.0.6
@angular/cli                    19.0.6
@angular/ssr                    19.0.6
@schematics/angular             19.0.6
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions