Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gdonega/f8ff66cf26fd5c7aea8ce6b8689931c2 to your computer and use it in GitHub Desktop.
Save gdonega/f8ff66cf26fd5c7aea8ce6b8689931c2 to your computer and use it in GitHub Desktop.
Habilitando as ferramentas de desenvolvimento novamente
...
let mainWindow
const winURL = process.env.NODE_ENV === 'development'
? `http://localhost:9080`
: `file://${__dirname}/index.html`
function createWindow () {
/**
* Initial window options
*/
mainWindow = new BrowserWindow({
height: 563,
useContentSize: true,
width: 1000,
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true
}
})
mainWindow.loadURL(winURL)
// Open dev tools initially when in development mode
if (process.env.NODE_ENV === 'development') { mainWindow.webContents.once('dom-ready', () => mainWindow.webContents.openDevTools()) }
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.allowRendererProcessReuse = true
app.on('ready', createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment