fix: use ELECTRON_RENDERER_URL (electron-vite sets this, not VITE_DEV_SERVER_URL)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -17,10 +17,10 @@ function createWindow() {
|
||||
},
|
||||
})
|
||||
|
||||
if (process.env.VITE_DEV_SERVER_URL) {
|
||||
win.loadURL(process.env.VITE_DEV_SERVER_URL)
|
||||
if (process.env.ELECTRON_RENDERER_URL) {
|
||||
win.loadURL(process.env.ELECTRON_RENDERER_URL)
|
||||
} else {
|
||||
win.loadFile(join(__dirname, '../dist/index.html'))
|
||||
win.loadFile(join(__dirname, '../renderer/index.html'))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<title>Elec</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style="color: #00ff00; font-size: 24px; padding: 40px;">TEST - IF YOU SEE THIS, HTML IS LOADING</div>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="../main.tsx"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user