mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-01-24 04:59:47 -05:00
fix "about" window in dev mode
This commit is contained in:
parent
8b2cdb0086
commit
232f2f4310
1 changed files with 12 additions and 6 deletions
|
@ -42,16 +42,22 @@ const createWindow = ({search = null, url = 'index.html', ...browserWindowOption
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isDevelopment) {
|
const fullUrl = formatUrl(isDevelopment ?
|
||||||
window.loadURL(`http://localhost:${process.env.ELECTRON_WEBPACK_WDS_PORT}/${url}`);
|
{ // Webpack Dev Server
|
||||||
} else {
|
hostname: 'localhost',
|
||||||
window.loadURL(formatUrl({
|
pathname: url,
|
||||||
|
port: process.env.ELECTRON_WEBPACK_WDS_PORT,
|
||||||
|
protocol: 'http',
|
||||||
|
search,
|
||||||
|
slashes: true
|
||||||
|
} : { // production / bundled
|
||||||
pathname: path.join(__dirname, url),
|
pathname: path.join(__dirname, url),
|
||||||
protocol: 'file',
|
protocol: 'file',
|
||||||
search,
|
search,
|
||||||
slashes: true
|
slashes: true
|
||||||
}));
|
}
|
||||||
}
|
);
|
||||||
|
window.loadURL(fullUrl);
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue