Skip to content
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

suport svg bundling in the pv-scripts webpack config #233

Open
mbehzad opened this issue Apr 17, 2024 · 0 comments
Open

suport svg bundling in the pv-scripts webpack config #233

mbehzad opened this issue Apr 17, 2024 · 0 comments

Comments

@mbehzad
Copy link
Contributor

mbehzad commented Apr 17, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant