Capacitor x Svelte Kit

i try to run it for my project but then i failed to npx cap sync. it says that the web assets directory must contain index.html and when i add it into build folder, everytime i do npm run build the index.html file suddenly dissapear… I tried to make custom folder aka public, and add index.html file and customize the capcitor.json it can be run but it just run the plain html while i need to run index.svelte to run my app… any suggestion for the problem? thanks in advance