removed express backend & added new ipc
This commit is contained in:
@@ -4,8 +4,8 @@ import { app, protocol, BrowserWindow } from 'electron';
|
||||
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib';
|
||||
import installExtension, { VUEJS3_DEVTOOLS } from 'electron-devtools-installer';
|
||||
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||
const path = require( 'path' );
|
||||
|
||||
require( './app.js' )
|
||||
|
||||
// Scheme must be registered before the app is ready
|
||||
protocol.registerSchemesAsPrivileged([
|
||||
@@ -22,10 +22,10 @@ async function createWindow() {
|
||||
// Use pluginOptions.nodeIntegration, leave this alone
|
||||
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
|
||||
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
|
||||
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION
|
||||
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||
// Load the url of the dev server if in development mode
|
||||
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
|
||||
@@ -35,6 +35,7 @@ async function createWindow() {
|
||||
// Load the index.html when not in development
|
||||
win.loadURL('app://./index.html')
|
||||
}
|
||||
require( './app.js' )( win );
|
||||
}
|
||||
|
||||
// Quit when all windows are closed.
|
||||
|
||||
Reference in New Issue
Block a user