Skip to content

Commit

Permalink
chore: build for ESM (#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
eglitise authored Sep 7, 2024
1 parent fa38705 commit 4367112
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/electron/main/updater.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {dialog} from 'electron';
import {autoUpdater} from 'electron-updater';
import pkg from 'electron-updater';
const {autoUpdater} = pkg;

import {t} from './helpers';

Expand Down
2 changes: 1 addition & 1 deletion app/electron/main/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function buildSessionWindow() {
minHeight: 710,
titleBarStyle: 'hiddenInset',
webPreferences: {
preload: join(__dirname, '..', 'preload', 'preload.js'), // from 'main' in package.json
preload: join(__dirname, '..', 'preload', 'preload.mjs'), // from 'main' in package.json
sandbox: false,
nodeIntegration: true,
contextIsolation: false,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion electron.vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
build: {
outDir: join(__dirname, 'dist', 'preload'),
lib: {
entry: join(__dirname, 'app', 'electron', 'preload', 'preload.js'),
entry: join(__dirname, 'app', 'electron', 'preload', 'preload.mjs'),
},
},
plugins: [externalizeDepsPlugin()],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
],
"homepage": "https://github.com/appium/appium-inspector",
"main": "./dist/main/main.js",
"type": "module",
"scripts": {
"lint": "eslint . --fix",
"prettier": "prettier . -w",
Expand Down

0 comments on commit 4367112

Please sign in to comment.