Skip to content

Commit

Permalink
🔧 fix: 修正 v2 版本插件的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Apr 23, 2021
1 parent c5d2681 commit 3a86f3c
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 13 deletions.
1 change: 1 addition & 0 deletions config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default defineConfig({
// renderer 部分相对根目录的输出路径为 ../..
outputPath: '../../release',
electronBuilder: {
rendererTarget: 'electron-renderer',
routerMode: isDev ? 'hash' : 'browser',
outputDir: 'release',
builderOptions: ElectronBuilderOpts,
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"clean": "rm -rf dist release .eslintcache ./src/.umi",
"postinstall": "cross-env APP_ROOT=src/renderer umi generate tmp && electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps",
"rebuild-deps": "electron-builder install-app-deps"
"rebuild-deps": "electron-builder install-app-deps",
"electron:init": "umi electron init"
},
"lint-staged": {
"*.{js,jsx,less,md,json}": [
Expand Down Expand Up @@ -97,6 +98,8 @@
"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,7 +119,7 @@
"ts-node": "^9.1.1",
"typescript": "^4.1.5",
"umi": "^3.4.6",
"umi-plugin-electron-builder": "^2.0.0-beta",
"umi-plugin-electron-builder": "^2.0.4",
"umi-plugin-tailwindcss": "^3.0.3"
}
}
2 changes: 1 addition & 1 deletion src/main/utils/window/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const createWindow = (opts: WindowOpts) => {
enableRemoteModule: remote,
// 上下文隔离环境
// https://www.electronjs.org/docs/tutorial/context-isolation
// contextIsolation: true,
contextIsolation: false,
// devTools: isDev,
},
});
Expand Down
Loading

0 comments on commit 3a86f3c

Please sign in to comment.