Skip to content

Commit

Permalink
feat: reenabled production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Dec 22, 2020
1 parent e65828d commit c165859
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
15 changes: 4 additions & 11 deletions app/main.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,12 @@ const createWindow = async () => {
icon: path.join(__dirname, '../resources/icon-no-padding-512x512.png'),
webPreferences: {
webSecurity: true,
nodeIntegration: false,
nodeIntegrationInWorker: false,
nodeIntegrationInSubFrames: false,
contextIsolation: true,
enableRemoteModule: false,
preload: path.join(__dirname, 'preload.js'),

...(process.env.NODE_ENV === 'development' || process.env.E2E_BUILD === 'true'
? {
nodeIntegration: false,
}
: {
nodeIntegration: false,
nodeIntegrationInWorker: false,
nodeIntegrationInSubFrames: false,
}),
},
});

Expand Down Expand Up @@ -189,6 +182,6 @@ ipcMain.handle('derive-key', async (_e, args) => {
return deriveKey(args);
});

ipcMain.handle('reload-app', (_e, args) => {
ipcMain.handle('reload-app', _e => {
mainWindow?.reload();
});
1 change: 0 additions & 1 deletion app/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ contextBridge.exposeInMainWorld('electron', {
__filename,
});

// SECURITY: don't expose entire process obj
contextBridge.exposeInMainWorld('process', { ...process });

contextBridge.exposeInMainWorld('api', {
Expand Down
2 changes: 1 addition & 1 deletion configs/webpack.config.renderer.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ DeleteSourceMaps();
export default merge(baseConfig, {
devtool: process.env.DEBUG_PROD === 'true' ? 'source-map' : 'none',

mode: 'development',
mode: 'production',

// target: 'electron-renderer',
target: 'web',
Expand Down

0 comments on commit c165859

Please sign in to comment.