Skip to content

Commit 2cc1570

Browse files
cloutprotocolclaude
andcommitted
fix: blank window — vite base must be relative for electrobun
Vite defaults to base: '/' producing absolute asset paths like /assets/index.js. Electrobun loads views from the filesystem where absolute paths don't resolve. Setting base: './' produces relative paths (./assets/index.js) that work in the webview. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 83f8213 commit 2cc1570

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import react from "@vitejs/plugin-react";
44
export default defineConfig({
55
plugins: [react()],
66
root: "src/mainview",
7+
base: "./",
78
build: {
89
outDir: "../../dist",
910
emptyOutDir: true,

0 commit comments

Comments
 (0)