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

Allow external imports in html template #18958

Open
4 tasks done
jroru opened this issue Dec 13, 2024 · 0 comments
Open
4 tasks done

Allow external imports in html template #18958

jroru opened this issue Dec 13, 2024 · 0 comments

Comments

@jroru
Copy link

jroru commented Dec 13, 2024

Description

As a developer using Vite I want to import files (e.g. an SVG icon) from a dependency in the HTML template.

See example: https://stackblitz.com/edit/vitejs-vite-l1zbnrgk?file=packages%2Fweb-app%2Findex.html

Suggested solution

Unaware

Alternative

I could simply copy the file into my own repo's public folder, but it is then duplicated. If I import the file elsewhere in my JavaScript, there will be two copies uploaded to the CDN.

Additional context

https://stackblitz.com/edit/vitejs-vite-l1zbnrgk?file=packages%2Fweb-app%2Findex.html

Validations

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

No branches or pull requests

1 participant