electron-vite icon indicating copy to clipboard operation
electron-vite copied to clipboard

SvelteKit: works for dev but error when building executable

Open Roboroads opened this issue 6 months ago • 0 comments

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

Roboroads avatar Jul 30 '24 19:07 Roboroads