From 77287febf43e86c086ab49029b7e4b94b844a0d9 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 6 Dec 2021 03:44:41 +0100 Subject: [PATCH] refactor: use process type specific electron imports in default_app (#32097) --- default_app/default_app.ts | 3 ++- default_app/main.ts | 2 +- default_app/preload.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/default_app/default_app.ts b/default_app/default_app.ts index 5e52422f1f30..44bc2ebd9aff 100644 --- a/default_app/default_app.ts +++ b/default_app/default_app.ts @@ -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'; diff --git a/default_app/main.ts b/default_app/main.ts index c1b309170c82..38172b788279 100644 --- a/default_app/main.ts +++ b/default_app/main.ts @@ -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'; diff --git a/default_app/preload.ts b/default_app/preload.ts index c446398912aa..aedaa6e6b7ae 100644 --- a/default_app/preload.ts +++ b/default_app/preload.ts @@ -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