Skip to content

Commit

Permalink
fix: pack error
Browse files Browse the repository at this point in the history
  • Loading branch information
scarqin committed Apr 21, 2022
1 parent 5e067cf commit 028b8cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"src/shared/**/*.js*",
"**/*/browser/dist/**/*",
"**/*/node/dist/**/*",
"src/core/api-manager/node/",
"src/workbench/node/",
"src/core/**/package.json",
"src/app/common/**/*",
"src/app/browser/index.html",
"!**/*.ts"
],
"publish": ["github"],
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"postinstall": "npm-run-all --serial install:* build:app",
"start": "npm-run-all -p startall electron:serve",
"startall": "npm-run-all -p start:*",
"install:app": "cd src/app/browser&&npm install",
"build:app": "cd src/app/browser&&npm run build",
"install:workbench": "cd src/workbench/browser&&npm install",
"start:workbench": "cd src/workbench/browser&&npm start",
"build:workbench": "cd src/workbench/browser&&npm run build",
Expand Down
4 changes: 2 additions & 2 deletions src/app/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ function createWindow(): BrowserWindow {
});
if (['serve'].includes(processEnv) ) {
require('electron-reload')(__dirname, {
electron: require(path.join(process.cwd(), '/node_modules/electron')),
electron: require(path.join(__dirname, '../node_modules/electron')),
});
}
proxyOpenExternal(win);
let loadPage = () => {
const file: string =
processEnv === 'development'
? 'http://localhost:4200'
: `file://${path.join(__dirname, '../browser', 'index.html')}`;
: `file://${path.join(__dirname, '../../workbench/browser/dist/index.html')}`;
win.loadURL(file);
win.webContents.openDevTools({
mode: 'undocked',
Expand Down

0 comments on commit 028b8cc

Please sign in to comment.