Created
April 6, 2020 02:23
-
-
Save gdonega/f8ff66cf26fd5c7aea8ce6b8689931c2 to your computer and use it in GitHub Desktop.
Habilitando as ferramentas de desenvolvimento novamente
This file contains hidden or 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
... | |
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