File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 - dist-electron/**/*
99extraResources :
1010 - from : config.default.json
11- to : ../ config.json
11+ to : config.json
1212win :
1313 icon : build/icon.ico
1414 target :
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import fs from 'node:fs';
55
66const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
77
8- // config.json lives next to the app :
8+ // Config paths :
99// dev → project root (process.cwd()), falls back to config.default.json
10- // prod → next to the executable (shipped from config.default.json )
11- const appDir = app . isPackaged ? path . dirname ( process . execPath ) : process . cwd ( ) ;
12- const configPath = path . join ( appDir , 'config.json' ) ;
13- const defaultConfigPath = path . join ( appDir , 'config.default.json' ) ;
10+ // prod → extraResources dir (Contents/Resources on macOS, resources/ on Linux/Windows )
11+ const configDir = app . isPackaged ? process . resourcesPath : process . cwd ( ) ;
12+ const configPath = path . join ( configDir , 'config.json' ) ;
13+ const defaultConfigPath = path . join ( configDir , 'config.default.json' ) ;
1414
1515interface Config {
1616 host : string ;
You can’t perform that action at this time.
0 commit comments