Describe the bug
Electron-Vite is a real great tool, making Electron dev a lot more accessible.
I'm trying to upgrade a working Electron application (Electron 41 + Electron-Vite 5 + Vite 7 + Svelte 5 + Typescript 6) to Electron 42+ and Vite 8, but the renderer build fails with 3 errors, complaining with message "Expected token }".
I also tried with a fresh minimal project and obtained the same errors (zip archive of the project included).
minimal-electron-test.zip
Steps to reproduce:
(using pnpm 11.22 as package manager)
- npm create @quick-start/electron@latest, selecting Svelte and TypeScript.
- pn dev (make sure the application based on old packages versions can start)
- pn up --latest (update all dependencies)
- pn add -d typescript@6.0.3 (rollback to TS 6 as waiting for TS 7.1)
- pn add -d electron-vite@6.0.0-beta.1
- pn build
Actual result:
message "Expected token }" on following files:
- [plugin vite-plugin-svelte:compile] rolldown/runtime.js
- [plugin vite-plugin-svelte:compile] src/renderer/src/main.ts
- [plugin vite-plugin-svelte:compile] svelte/src/internal/client/index.js
Additional observations:
- main build succeeds.
- preload build succeeds.
- renderer build fails.
- reproduces in a clean project.
- reproduces with Vite 8.0.0, 8.0.16, 8.2.1 and 8.2.2.
- svelte-check passes.
- no custom Vite or Svelte configuration required to reproduce.
Custom debug transform
Adding a simple custom debug transform shows following output:
- TRANSFORM: rolldown/runtime.js
- TRANSFORM: .../src/renderer/index.html
- TRANSFORM: .../src/renderer/src/main.ts
- TRANSFORM: .../node_modules/.pnpm/svelte@5.56.10_@typescript-eslint+types@8.67.0/node_modules/svelte/src/internal/client/index.js
Note: sorry when duplicate, but I cannot read chinese characters.
Electron-Vite Version
6.0.0-beta.1
Electron Version
43.4.1
Vite Version
8.2.2
Validations
Describe the bug
Electron-Vite is a real great tool, making Electron dev a lot more accessible.
I'm trying to upgrade a working Electron application (Electron 41 + Electron-Vite 5 + Vite 7 + Svelte 5 + Typescript 6) to Electron 42+ and Vite 8, but the renderer build fails with 3 errors, complaining with message "Expected token }".
I also tried with a fresh minimal project and obtained the same errors (zip archive of the project included).
minimal-electron-test.zip
Steps to reproduce:
(using pnpm 11.22 as package manager)
Actual result:
message "Expected token }" on following files:
Additional observations:
Custom debug transform
Adding a simple custom debug transform shows following output:
Note: sorry when duplicate, but I cannot read chinese characters.
Electron-Vite Version
6.0.0-beta.1
Electron Version
43.4.1
Vite Version
8.2.2
Validations