Skip to content

Commit f4d5293

Browse files
authored
fix(build): change href from / to . (#271)
Fixes: #267 * Changed index.html's href from / to . * Defaults to sdk build flavor and opens devtools
1 parent 609ed1f commit f4d5293

3 files changed

Lines changed: 15 additions & 38 deletions

File tree

package-lock.json

Lines changed: 7 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
"test": "ng test",
1515
"start": "concurrently -k npm:dev:ng npm:dev:nw",
1616
"postinstall": "base-volta-off-of-nwjs",
17+
"dev": "concurrently -k npm:dev:ng npm:dev:nw",
1718
"dev:ng": "ng serve",
1819
"dev:nw": "wait-on -c waitOn.config.json http-get://localhost:4200 && nw .",
1920
"bld": "npm run bld:ng && npm run bld:nw",
2021
"bld:ng": "ng build --output-path ./out/ng",
2122
"bld:nw": "nwbuild --cacheDir=./node_modules/nw --outDir=./out/nw --managedManifest=./package.nw.json \"./package.json ./out/ng/**/*\"",
23+
"bld:run:linux": "cd ./out/nw/ && ./nw-angular-example",
2224
"lint": "ng lint"
2325
},
2426
"private": true,
@@ -50,7 +52,7 @@
5052
"karma-coverage": "~2.2.0",
5153
"karma-jasmine": "~5.1.0",
5254
"karma-jasmine-html-reporter": "~2.1.0",
53-
"nw": "^0.104.0",
55+
"nw": "^0.104.0-sdk",
5456
"nw-builder": "^4.16.0",
5557
"typescript": "~5.7.2",
5658
"typescript-eslint": "8.40.0",

src/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
<head>
44
<meta charset="utf-8">
55
<title>App</title>
6-
<base href="/">
6+
<base href="./">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<link rel="icon" type="image/x-icon" href="favicon.ico">
9+
<script>
10+
if(process.versions["nw-flavor"] === "sdk")
11+
require('nw.gui').Window.get().showDevTools();
12+
</script>
913
</head>
1014
<body>
1115
<app-root></app-root>

0 commit comments

Comments
 (0)