Skip to content

Instantly share code, notes, and snippets.

@ashitaka1963
Last active April 23, 2020 22:11
Show Gist options
  • Save ashitaka1963/5fc5660e6298528d2dcc7ce7cd4b62e8 to your computer and use it in GitHub Desktop.
Save ashitaka1963/5fc5660e6298528d2dcc7ce7cd4b62e8 to your computer and use it in GitHub Desktop.
DevToolsを非表示にする #Electron #Vue.js
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