Skip to content

Commit 632c454

Browse files
author
Yuri Cherepanov
committed
require is not defined
fix security issue with http local server: https://github.com/electron/electron/blob/master/docs/api/browser-window.md#class-browserwindow beutify dev-web -> web fix tslint.json v5 naming issue
1 parent c4b2cb6 commit 632c454

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

angular.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
}
5151
]
5252
},
53-
"dev-web": {
53+
"web": {
5454
"optimization": false,
5555
"outputHashing": "all",
5656
"sourceMap": true,
@@ -95,8 +95,8 @@
9595
"dev": {
9696
"browserTarget": "angular-electron:build:dev"
9797
},
98-
"dev-web": {
99-
"browserTarget": "angular-electron:build:dev-web"
98+
"web": {
99+
"browserTarget": "angular-electron:build:web"
100100
},
101101
"production": {
102102
"browserTarget": "angular-electron:build:production"

main.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function createWindow() {
1919
height: size.height,
2020
webPreferences: {
2121
nodeIntegration: true,
22+
allowRunningInsecureContent: (serve) ? true : false,
2223
},
2324
});
2425

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"build:dev": "npm run build -- -c dev",
2525
"build:prod": "npm run build -- -c production",
2626
"ng:serve": "ng serve",
27-
"ng:serve:web": "ng serve -c dev-web -o",
27+
"ng:serve:web": "ng serve -c web -o",
2828
"electron:serve-tsc": "tsc -p tsconfig-serve.json",
2929
"electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve",
3030
"electron:local": "npm run build:prod && electron .",
@@ -59,7 +59,7 @@
5959
"codelyzer": "5.1.0",
6060
"conventional-changelog-cli": "2.0.25",
6161
"core-js": "3.1.4",
62-
"electron": "7.0.0",
62+
"electron": "7.1.1",
6363
"electron-builder": "21.2.0",
6464
"electron-reload": "1.5.0",
6565
"jasmine-core": "3.4.0",

tslint.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
}
8181
],
8282
"unified-signatures": true,
83-
"use-life-cycle-interface": true,
83+
"use-lifecycle-interface": true,
8484
"use-lifecycle-interface": true,
8585
"use-pipe-transform-interface": true,
8686
"variable-name": false,

0 commit comments

Comments
 (0)