Manually emitting and serving a static html file with(out) netlify-adapter #12560
Unanswered
moiri-gamboni
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I’m trying to manually generate a static html file during the build and serve it on Netlify. I’m using a custom Vite plugin to do so. The file is clearly being emitted in the logs, and I can download it in the deploy’s file browser. I can also access it on my local production build with Vite, but not with
netlify serve
or on the web deploy which result in a 404. I see that it’s not in the manifest’s assets, which I assume is the issue, but I don’t know why it isn’t there or how I’m supposed to add it/prevent SvelteKit from treating it as a non-static asset. I tried manually adding it toincluded_files
innetlify.toml
but it made no difference. I also tried writing the file usingfs
rather thanemitFile()
but again it didn’t work. Other static files which are present under/static
before building are accessible as normal, as well as other non-static routes.Latest deploy
Repo
Where I emit the file
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions