You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some use cases to load svg resources in a frontend application.
1- when client side rendering the markup via js.
2- showing in the css background, mask etc.
3- fonts. (although every browser support woff2 file types and there is no reason really to use .svg fonts)
I would argue that the bundler should provide the svg's content (raw) for js. for css on the other hand it makes more sense to emit the asset to the target directory and use the url in the css or base64 encode and inline it.
PR #232 will add this functionality, with the said default configuration (raw for js and
external url for css) and optional queries for customization (inline, ignore, etc)
The text was updated successfully, but these errors were encountered:
There are some use cases to load svg resources in a frontend application.
1- when client side rendering the markup via js.
2- showing in the css background, mask etc.
3- fonts. (although every browser support woff2 file types and there is no reason really to use .svg fonts)
I would argue that the bundler should provide the svg's content (raw) for js. for css on the other hand it makes more sense to emit the asset to the target directory and use the url in the css or base64 encode and inline it.
PR #232 will add this functionality, with the said default configuration (raw for js and
external url for css) and optional queries for customization (inline, ignore, etc)
The text was updated successfully, but these errors were encountered: