Open Tommertom opened 1 year ago
vite detection is already there https://github.com/ionic-team/capacitor/pull/6039
but not sveltekit, can you provide a sample app?
Ok great- here a happy path SvelteKit app (adapter static and ssr=false) - https://github.com/Tommertom/svelte-ionic-app
Bug Report
Capacitor Version
Current version - just by reading source code
This code snippet in https://github.com/ionic-team/capacitor/blob/main/cli/src/framework-configs.ts
SvelteKit rc 1.0 does not have sirv anymore
SvelteKit with adapter static and in SPA mode (ssr=false) needs
build
webDir. With ssr=true I believe there isbuild/client
andbuild/server
.SvelteKit other than static - I believe cannot be deployed in Capacitor (because requiring express server) - so then issue warning "wrong adapter?".. Maybe getting a bit complicated this way.
Then we have Svelte with Vite
npm create vite@latest
(so not Kit) - which probably needs separate detection? I think it isbuild
for this one - but not sure.Maybe as alternative to trying to code this - remove the above snippet and giving a notice to the user that the CLI was not able to conclusively establish which framework so better to check webDir manually (defaulted to whatever..)