Last active
April 23, 2020 22:11
-
-
Save ashitaka1963/5fc5660e6298528d2dcc7ce7cd4b62e8 to your computer and use it in GitHub Desktop.
DevToolsを非表示にする #Electron #Vue.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createWindow () { | |
// Create the browser window. | |
win = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { | |
nodeIntegration: true | |
} | |
}) | |
if (process.env.WEBPACK_DEV_SERVER_URL) { | |
// Load the url of the dev server if in development mode | |
win.loadURL(process.env.WEBPACK_DEV_SERVER_URL) | |
// if (!process.env.IS_TEST) win.webContents.openDevTools() ←ここをコメントアウト | |
} else { | |
createProtocol('app') | |
// Load the index.html when not in development | |
win.loadURL('app://./index.html') | |
} | |
win.on('closed', () => { | |
win = null | |
}) | |
created() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment