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

Export assets/icons/* from package #1094

Closed
salmenf opened this issue Jan 3, 2023 · 1 comment
Closed

Export assets/icons/* from package #1094

salmenf opened this issue Jan 3, 2023 · 1 comment
Assignees
Labels
feature Feature requests.

Comments

@salmenf
Copy link

salmenf commented Jan 3, 2023

What issue are you having?

A bit of an obscure use case, but: I like to import some of the icons directly as raw SVG to use them directly in the code without depending on external files.

// I can import the raw SVG as a string using vite like this:
import iconBold from "@shoelace-style/shoelace/dist/assets/icons/type-bold.svg?raw"

However, dist/assets/icons/* ist not part of the exports field in package.json, so vite rejects importing it. For Vite, this is intended behaviour and they won't change it.

Describe the solution you'd like

I'd like to simply adjust Shoelace's package.json to export the icons.

Describe alternatives you've considered

Right now, I am manually changing Shoelace's package.json, which is not great on many levels.

@salmenf salmenf added the feature Feature requests. label Jan 3, 2023
@claviska
Copy link
Member

Closing this issue per my response in this related PR.

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

Successfully merging a pull request may close this issue.

2 participants