-
Notifications
You must be signed in to change notification settings - Fork 12k
No loader is configured for ".svg" (esbuild) #26336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can't believe new build system has been released without having the option to at least configure this. |
This is working as expected since SVG is not a valid ESM Module. |
It's not about "working as designed". By the way, esbuild could be configured to deal with SVG. But in the way angular is integrating esbuild, there is possibility to configure esbuild loaders. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
build
Description
Please add the ability to import .svg in .ts with esbuild.
Example of use case:
In this specific use case we could use
addSvgIconSetLiteral
and an URL but the svg won't be part of the build anymore.When it's part of the build we can have size stats about svg in our bundle and possibly get the .svg files hashed (cache busting), useful when you set multiple svg files inside a single svg using symbols (which angular component icon supports btw).
We could also import it directly in a template without having to create a svg component
Describe the solution you'd like
No response
Describe alternatives you've considered
As an alternative you can rename the .svg to .txt, it will be loaded using the esbuild text loader.
The text was updated successfully, but these errors were encountered: