refactor: use process type specific electron imports in default_app (#32097)

This commit is contained in:
Milan Burda 2021-12-06 03:44:41 +01:00 committed by GitHub
parent f46e9c3205
commit 77287febf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,5 @@
import { app, dialog, BrowserWindow, shell, ipcMain } from 'electron';
import { shell } from 'electron/common';
import { app, dialog, BrowserWindow, ipcMain } from 'electron/main';
import * as path from 'path';
import * as url from 'url';

View file

@ -1,4 +1,4 @@
import * as electron from 'electron';
import * as electron from 'electron/main';
import * as fs from 'fs';
import * as path from 'path';

View file

@ -1,4 +1,4 @@
import { ipcRenderer, contextBridge } from 'electron';
import { ipcRenderer, contextBridge } from 'electron/renderer';
const policy = window.trustedTypes.createPolicy('electron-default-app', {
// we trust the SVG contents