Replies: 2 comments 4 replies
-
Any Solution to this? Having the same problem rn... would be glad for any help :( |
Beta Was this translation helpful? Give feedback.
0 replies
-
In newer Kit versions you can set To make routing work, set the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! For reasons outside of our control, we require our SvelteKit app to work over the
file://
protocol. The goal is to build the app, transfer files to client machines, and have them use it by launchingindex.html
.The biggest obstacle so far is that browsers refuse to load ESM scripts over
file://
URLs, which means all JS is being blocked. It looks like Vite can be configured to targetes5
, but that also would remove modern JS syntax likelet
andconst
, which is not desired. I also looked into legacy builds, but support for them is currently an open issue.I have prepared a demo repo configured to build the Svelte Kit demo app with the static adapter. You can try it yourself by building it and pointing your browser directly to
build/index.html
. You will get a blank screen and errors in the console:Beta Was this translation helpful? Give feedback.
All reactions