Don't webpack electron main, separate electron
* Don't webpack electron-main.js: no need to webpack in electron * Keep the electron file separate from the webapp, in their own 'electron' directory
This commit is contained in:
parent
976c20a2f7
commit
2026142595
4 changed files with 9 additions and 44 deletions
18
electron/src/electron-main.js
Normal file
18
electron/src/electron-main.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// @flow
|
||||
const {app, BrowserWindow} = require('electron');
|
||||
|
||||
let window = null;
|
||||
|
||||
app.on('ready', () => {
|
||||
window = new BrowserWindow({
|
||||
icon: `${__dirname}/../../vector/img/logo.png`,
|
||||
});
|
||||
window.loadURL(`file://${__dirname}/../../vector/index.html`);
|
||||
window.on('closed', () => {
|
||||
window = null;
|
||||
})
|
||||
});
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
app.quit();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue