Skip to content

Commit

Permalink
📦 chore: 更新 umi-plugin-electron-builder 依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Mar 24, 2021
1 parent ba7e1ca commit c5d2681
Show file tree
Hide file tree
Showing 6 changed files with 394 additions and 2,027 deletions.
3 changes: 0 additions & 3 deletions config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import routes from './routes';

import ElectronBuilderOpts from './electronBuilderOpts';

const mainWebpackConfig = require('./webpack.main');

// 必须将作为node的依赖,例如 sqlite3、typeORM 等 external 掉
// 否则无法使用
const pkg = readJSONSync(resolve(srcPath, '../package.json'));
Expand Down Expand Up @@ -45,7 +43,6 @@ export default defineConfig({
outputDir: 'release',
builderOptions: ElectronBuilderOpts,
externals,
mainWebpackConfig,
},
alias: {
'@/common': resolve(srcPath, './common'),
Expand Down
25 changes: 0 additions & 25 deletions config/webpack.main.ts

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
]
},
"dependencies": {
"@arvinxu/macos-traffic-light": "^2.0.3",
"electron-updater": "^4.3.8",
"inversify": "^5.0.5",
"log4js": "^6.3.0",
Expand Down Expand Up @@ -96,8 +97,6 @@
"electron-devtools-installer": "^3.1.1",
"electron-is": "^3.0.0",
"electron-log": "^4.3.2",
"electron-webpack": "^2.8.2",
"electron-webpack-ts": "^4.0.1",
"eslint": "^7.21.0",
"husky": "^4.3.8",
"inversify-binding-decorators": "^4.0.0",
Expand All @@ -116,8 +115,8 @@
"ts-jest": "^26.5.3",
"ts-node": "^9.1.1",
"typescript": "^4.1.5",
"umi": "^3.3.9",
"umi-plugin-electron-builder": "^1.0.18",
"umi": "^3.4.6",
"umi-plugin-electron-builder": "^2.0.0-beta",
"umi-plugin-tailwindcss": "^3.0.3"
}
}
File renamed without changes.
9 changes: 9 additions & 0 deletions src/preload/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { contextBridge } from 'electron';

const apiKey = 'electron';

const api: any = {
versions: process.versions,
};

contextBridge.exposeInMainWorld(apiKey, api);
Loading

0 comments on commit c5d2681

Please sign in to comment.