Skip to content

SSR Text Loader Resolves To Wrong Result #29235

Closed

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

Activity

  1. added a commit that references this issue on Jan 9, 2025
    3efa312
  2. added 2 commits that reference this issue on Jan 9, 2025
    fea422d
    8aa1ce6
  3. Char2sGu commented on Jan 9, 2025

    @Char2sGu
    Author

    Hey @alan-agius4 thanks for the fix! When will this be published?

  4. added a commit that references this issue on Jan 9, 2025
    134f5fe
  5. alan-agius4 commented on Jan 9, 2025

    @alan-agius4
    Collaborator

    This will be available on NPM next week.
    Typically releases happen on Wednesdays.

  6. angular-automatic-lock-bot commented on Feb 9, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  7. locked and limited conversation to collaborators on Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    angular/build:applicationarea: @angular/buildfreq1: lowseverity3: brokentype: bug/fix

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions