Skip to content

Commit 8957334

Browse files
committed
1 parent c02a07e commit 8957334

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

app/handlers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ handlers.exportAs = (callback, type, content) => {
9999
callback.onSuccess();
100100
}
101101

102-
module.exports = handlers;
102+
window.handlers = handlers;

app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
var App = {};
1717

18-
App.handlers = require('./handlers');
18+
App.handlers = window.handlers;
1919

2020
/**
2121
* @type {string}

app/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production'
77
let win
88

99
function createWindow () {
10+
console.log(app.getAppPath());
1011
win = new BrowserWindow({
1112
width: 1000,
1213
height: 700,
1314
icon: path.join(__dirname, 'assets/images/app-icon.png'),
1415
webPreferences: {
15-
nodeIntegration: true,
16-
enableRemoteModule: true
16+
enableRemoteModule: true,
17+
preload: path.join(__dirname, 'handlers.js')
1718
}
1819
})
1920

0 commit comments

Comments
 (0)