GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [BUG][PWA] Url error in the "ngsw.json" file with a "baseHref" pointing to a file (eg: "/index.html") · Issue #12853 · angular/angular-cli Open Labels area: @angular-devkit/build-angularfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix Milestone DescriptionBug Report or Feature RequestFrom here: angular/angular#26917 CommandVersionsCurrent behaviorI have a problem with the file {
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"xxxxxx-xxxxxx-web": {
...
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref": "/index.html", <-- baseHref with path to a file
...
},
"configurations": {
"develop": {
...
"baseHref": "/dev-web-xxxxxx-xxxxxx/index.html", <-- baseHref with path to a file
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.develop.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true
}
...As you can see, my {
"configVersion": 1,
"index": "/dev-web-xxxxxx-xxxxxx/index.html/index.html",
"assetGroups": [ ^^^^^^^^^^
{
"name": "app",
"installMode": "prefetch",
"updateMode": "prefetch",
"urls": [ vvvvvvvvvv
"/dev-web-xxxxxx-xxxxxx/index.html/4.459d2c031076fa54578c.js",
"/dev-web-xxxxxx-xxxxxx/index.html/5.b0a92526f07730e41004.js",
"/dev-web-xxxxxx-xxxxxx/index.html/index.html",
"/dev-web-xxxxxx-xxxxxx/index.html/main.284d15247a9766d625e1.js",
"/dev-web-xxxxxx-xxxxxx/index.html/polyfills.f8bea440aac573c30541.js",
"/dev-web-xxxxxx-xxxxxx/index.html/runtime.e04cbf91ceee4f9b3494.js",
"/dev-web-xxxxxx-xxxxxx/index.html/styles.380a38f67b77a997829f.css"
], ^^^^^^^^^^
"patterns": []
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"urls": [ vvvvvvvvvv
"/dev-web-xxxxxx-xxxxxx/index.html/assets/icons/icon-128x128.png",
"/dev-web-xxxxxx-xxxxxx/index.html/assets/icons/icon-144x144.png",
... ^^^^^^^^^^As you can see, it generates all the urls of the file with the Expected behaviorI think the file should have looked like this: {
"configVersion": 1,
"index": "/dev-web-xxxxxx-xxxxxx/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"updateMode": "prefetch",
"urls": [
"/dev-web-xxxxxx-xxxxxx/4.459d2c031076fa54578c.js",
"/dev-web-xxxxxx-xxxxxx/5.b0a92526f07730e41004.js",
"/dev-web-xxxxxx-xxxxxx/index.html",
"/dev-web-xxxxxx-xxxxxx/main.284d15247a9766d625e1.js",
"/dev-web-xxxxxx-xxxxxx/polyfills.f8bea440aac573c30541.js",
"/dev-web-xxxxxx-xxxxxx/runtime.e04cbf91ceee4f9b3494.js",
"/dev-web-xxxxxx-xxxxxx/styles.380a38f67b77a997829f.css"
],
"patterns": []
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"urls": [
"/dev-web-xxxxxx-xxxxxx/assets/icons/icon-128x128.png",
"/dev-web-xxxxxx-xxxxxx/assets/icons/icon-144x144.png",
...Minimal reproduction of the problem with instructionsYou just have to create an application (which uses PWA) and have a baseHref that points to a file (eg: What is the motivation / use case for changing the behavior?I think it would just take into account when the "baseHref" to deal with a file, take the root of the file (and not take the file for a folder). For information, I use a For now, I make the corrections of the url in the file Activity
MetadataMetadataAssigneesLabelsarea: @angular-devkit/build-angularfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |