Skip to content

Raw file imports in the Esbuild builder #26445

Closed as not planned
Closed as not planned
@santam85

Description

@santam85

Command

build, serve

Description

With the webpack builder I was able to do raw imports by using
require('!!rawloader!./somefile.ts').default
Seems I should be able to to the same with devkit/build-angular:application too, by configuring a plugin in the options, but could not achieve it. Vilte seems to support it by appending ?raw to the file path.

Describe the solution you'd like

Would be great to be able to useimport('raw!./somefile.ts') or similar.

Describe alternatives you've considered

I checked the loader option on the workspace config, but could not make it work for ts or html files. There seems to be an internal option to load plugins in the builder, but that's not accessible as a configuration option.

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