We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 050a17d commit 0817b23Copy full SHA for 0817b23
1 file changed
vite.config.ts
@@ -2,7 +2,9 @@ import { defineConfig } from 'vite'
2
import react from '@vitejs/plugin-react'
3
import { resolve } from 'path'
4
5
-export default defineConfig({
+export default defineConfig(({ command }) => ({
6
+ // Use relative asset paths in production so file:// loads work from DMG/app bundle
7
+ base: command === 'build' ? './' : '/',
8
plugins: [react()],
9
root: './src/renderer',
10
build: {
@@ -17,4 +19,4 @@ export default defineConfig({
17
19
server: {
18
20
port: 3000,
21
},
-})
22
+}))
0 commit comments