electron-vite
electron-vite copied to clipboard
SvelteKit: works for dev but error when building executable
Describe the bug
Since SvelteKit compiles itself as a full static website, there's no index.html entrypoint. I feel like some config, after adding the sveltekit plugin, get overridden by electron-vite, which when asks for an index.html entrypoint to be present.
I created a repository with just the changes I did to make SvelteKit working (from the quickstart template svelte-ts); https://github.com/Roboroads/electron-vite-sveltekit
When running npm run build
we receive this error:
[vite-plugin-sveltekit-compile] Could not resolve entry module "index.html".
Could not resolve entry module "index.html".
at getRollupError (file:///home/roboroads/BagOfHolding/I.T.it/Projects/electron-vite-sveltekit/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
at error (file:///home/roboroads/BagOfHolding/I.T.it/Projects/electron-vite-sveltekit/node_modules/rollup/dist/es/shared/parseAst.js:388:42)
at ModuleLoader.loadEntryModule (file:///home/roboroads/BagOfHolding/I.T.it/Projects/electron-vite-sveltekit/node_modules/rollup/dist/es/shared/node-entry.js:19157:20)
at async Promise.all (index 0)
Electron-Vite Version
2.3.0
Electron Version
31.3.1
Vite Version
5.3.5
SvelteKit Version
2.5.18
Validations
- [X] Follow the Code of Conduct.
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.