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

Import sprites as tree-shakeable file #2

Open
cyyynthia opened this issue Feb 5, 2022 · 0 comments
Open

Import sprites as tree-shakeable file #2

cyyynthia opened this issue Feb 5, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@cyyynthia
Copy link
Owner

cyyynthia commented Feb 5, 2022

Make it so symbols in a SVG file are exported in a format that can be tree-shaken, such as

<svg>
  <symbol id='a'>...</symbol>
  <symbol id='b'>...</symbol>
</svg>

Becomes:

export const A = ...
export const B = ...
export default ...

where the name scheme is configurable (default camel for DOM, pascal for (P)React

@cyyynthia cyyynthia added the enhancement New feature or request label Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant