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

Add support for customizable base option and auto appending .svg extension #3119

Open
iamjaeholee opened this issue Jan 8, 2025 · 0 comments

Comments

@iamjaeholee
Copy link

Description

Currently, the src base is set to the public directory, but I think it would be useful to add an option that allows users to customize the base directory.

Why?

  • Some users might prefer to store SVG assets within the src folder instead of the public directory.
  • Even when using the public directory, assets are often organized within an assets folder, so having to specify paths like assets/svgname.svg repeatedly can be inconvenient.

Proposal

  1. Introduce a base option to set a custom directory from which SVGs are resolved. This way, users can easily define where their SVG files are located.
  2. Allow users to reference SVGs without explicitly including the .svg extension. For example, typing svgname would automatically resolve as svgname.svg.

Benefits

  • Improved flexibility for asset organization.
  • Enhanced developer experience with shorter and more intuitive path references.

If this proposal sounds good, I'd like to take a stab at implementing it. What do you think?

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

No branches or pull requests

1 participant