@@ -12,16 +12,21 @@ const isDevelopment = process.env.NODE_ENV !== 'production'
12
12
let win
13
13
14
14
// Scheme must be registered before the app is ready
15
- < % if ( newSchemeRegistrationFunction ) { % > protocol . registerSchemesAsPrivileged ( [ { scheme : 'app' , privileges : { secure : true , standard : true } } ] )
16
- < % } else { % > protocol . registerStandardSchemes ( [ 'app' ] , { secure : true } )
17
- < % } % >
18
- function createWindow ( ) {
15
+ protocol . registerSchemesAsPrivileged ( [
16
+ { scheme : 'app' , privileges : { secure : true , standard : true } }
17
+ ] )
18
+
19
+ function createWindow ( ) {
19
20
// Create the browser window.
20
- win = new BrowserWindow ( { width : 800 , height : 600 , webPreferences : {
21
- // Use pluginOptions.nodeIntegration, leave this alone
22
- // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
23
- nodeIntegration : process . env . ELECTRON_NODE_INTEGRATION
24
- } } )
21
+ win = new BrowserWindow ( {
22
+ width : 800 ,
23
+ height : 600 ,
24
+ webPreferences : {
25
+ // Use pluginOptions.nodeIntegration, leave this alone
26
+ // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
27
+ nodeIntegration : process . env . ELECTRON_NODE_INTEGRATION
28
+ }
29
+ } )
25
30
26
31
if ( process . env . WEBPACK_DEV_SERVER_URL ) {
27
32
// Load the url of the dev server if in development mode
@@ -84,7 +89,7 @@ app.on('ready', async () => {
84
89
// Exit cleanly on request from parent process in development mode.
85
90
if ( isDevelopment ) {
86
91
if ( process . platform === 'win32' ) {
87
- process . on ( 'message' , data => {
92
+ process . on ( 'message' , ( data ) => {
88
93
if ( data === 'graceful-exit' ) {
89
94
app . quit ( )
90
95
}
0 commit comments