Replies: 2 comments
-
I did found a way, to basically inject |
Beta Was this translation helpful? Give feedback.
-
Try the See these examples: |
Beta Was this translation helpful? Give feedback.
-
I did found a way, to basically inject |
Beta Was this translation helpful? Give feedback.
-
Try the See these examples: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to write a custom Vite plugin for SvelteKit that modifies HTML when running
npm run dev
— basically to inject some scripts and metadata automatically.The problem is: Vite never seems to detect or pass
app.html
through the plugin system. I’ve tried usingtransform()
,transformIndexHtml()
, and other plugin hooks. The plugin triggers just fine for.svelte
files and even for CSS likeapp.css
, butapp.html
is not getting passed.My
vite.config.ts
setup:I expected
transformIndexHtml
or any other vite hook to catchapp.html
the way it does withindex.html
or any other.svelte
files normally. But nothing happens — it seems like SvelteKit bypasses that path completely.So my questions:
app.html
and commit to it.Would appreciate any clarity on this, and what the recommended approach is if I want to achieve it.
Beta Was this translation helpful? Give feedback.
All reactions