mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-22 23:53:08 +00:00
fix: Correct __dirname paths for Vite bundled electron modules
Vite bundles all electron modules into a single main.js file, so __dirname remains apps/ui/dist-electron regardless of source file location. Updated path comments to clarify this behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,9 +27,10 @@ export function getIconPath(): string | null {
|
||||
iconFile = 'logo_larger.png';
|
||||
}
|
||||
|
||||
// __dirname is apps/ui/dist-electron (Vite bundles all into single file)
|
||||
const iconPath = isDev
|
||||
? path.join(__dirname, '../../public', iconFile)
|
||||
: path.join(__dirname, '../../dist/public', iconFile);
|
||||
? path.join(__dirname, '../public', iconFile)
|
||||
: path.join(__dirname, '../dist/public', iconFile);
|
||||
|
||||
try {
|
||||
if (!electronAppExists(iconPath)) {
|
||||
|
||||
Reference in New Issue
Block a user