mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-24 00:19:21 +00:00
win import path
This commit is contained in:
+6
-13
@@ -11,7 +11,9 @@ const { electron } = require('process');
|
|||||||
|
|
||||||
var env = process.env.NODE_ENV || 'prod';
|
var env = process.env.NODE_ENV || 'prod';
|
||||||
|
|
||||||
const { nodeapp } = import(path.join(__dirname, env=='prod' ? '../' : '', 'src/app.js'));
|
const { nodeapp } = import(
|
||||||
|
path.join('file:///', __dirname, env == 'prod' ? '../' : '', 'src/app.js')
|
||||||
|
);
|
||||||
|
|
||||||
// Load Icons
|
// Load Icons
|
||||||
// TODO: Icons appear pixelated
|
// TODO: Icons appear pixelated
|
||||||
@@ -65,18 +67,9 @@ function createWindow() {
|
|||||||
win.setMenu(null);
|
win.setMenu(null);
|
||||||
|
|
||||||
// Load page served by node
|
// Load page served by node
|
||||||
try {
|
win.loadURL('http://localhost:4001/editor').then(() => {
|
||||||
// loaded = path.join(__dirname, '../client/build/index.html');
|
win.webContents.setBackgroundThrottling(false);
|
||||||
// win.loadURL(`file://${loaded}`);
|
});
|
||||||
win.loadURL('http://localhost:4001/editor');
|
|
||||||
//win.loadURL(`file://${__dirname}/dist/index.html`);
|
|
||||||
} catch (error) {
|
|
||||||
loaded = error;
|
|
||||||
}
|
|
||||||
|
|
||||||
// win.loadURL('http://localhost:4001/editor').then(() => {
|
|
||||||
// win.webContents.setBackgroundThrottling(false);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Show dev tools
|
// Show dev tools
|
||||||
win.webContents.openDevTools({ mode: 'detach' });
|
win.webContents.openDevTools({ mode: 'detach' });
|
||||||
|
|||||||
Reference in New Issue
Block a user