Skip to content

Support Raw Loading with application and builder-esbuild #26368

Closed
@mcdenhoed

Description

@mcdenhoed

Command

build, serve

Description

I have some raw text files that I need to include in my build. To load them with builder-based builds, I am using the webpack raw-loader plugin.

I currently import them as follows:

import contents from "raw-loader!./some-text-file.txt";

It would be amazing if I could do something similar from within the new esbuild-based loader. I saw that vite allows for a ?raw suffix on imports to do just this, but it did not seem to work when I tried it in Angular.

Hopefully I'm just missing something here, but I didn't see this called out in the documentation.

Describe the solution you'd like

No response

Describe alternatives you've considered

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