Skip to content

Using templateUrl with a .svg file #10567

Closed
@phenomnomnominal

Description

@phenomnomnominal

Hey friendly @angular/cli team!

Would there be any appetite to enable using a .svg file as a component template?

As far as I can tell it would be a small change in webpack-config/common.js from:

{ test: /\.html$/, loader: 'raw-loader' },
{ test: /\.(eot|svg|cur)$/, // ...

to

{ test: /\.(html|svg)$/, loader: 'raw-loader' },
{ test: /\.(eot|cur)$/, // ...

Are there any downsides to this? Are there any other places that the change would need to be handled? It seems to work when I change it in my node_modules.

Let me know if this is something that would be useful/wanted, and I'll make a PR.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions