File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import { app , dialog } from 'electron'
22
3+ globalThis . __dirname ||= import . meta. dirname
4+
35// Expose the dev build version when running unpackaged so logs stay accurate.
46if ( ! app . isPackaged ) {
57 app . getVersion = ( ) => import . meta. env . VITE_APP_VERSION
Original file line number Diff line number Diff line change 1- import { join } from 'node:path'
21import { app } from 'electron'
2+ import { join } from 'node:path'
33import { isPackaged } from './common'
44
55const sessionDir = app . getPath ( 'sessionData' )
@@ -23,7 +23,7 @@ export const appConfig = {
2323 get webBaseURL ( ) {
2424 return ! isPackaged && import . meta. env . VITE_DEV_SERVER_URL !== undefined
2525 ? import . meta. env . VITE_DEV_SERVER_URL
26- : `file://${ join ( __dirname , './web/index.html' ) } `
26+ : `file://${ join ( import . meta . dirname , './web/index.html' ) } `
2727 } ,
2828} as const
2929
You can’t perform that action at this time.
0 commit comments