Title: bug(service-worker): `/` path is omitted by ngsw-config · Issue #19945 · angular/angular · GitHub
Open Graph Title: bug(service-worker): `/` path is omitted by ngsw-config · Issue #19945 · angular/angular
X Title: bug(service-worker): `/` path is omitted by ngsw-config · Issue #19945 · angular/angular
Description: I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here...
Open Graph Description: I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => P...
X Description: I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request ...
Opengraph URL: https://github.com/angular/angular/issues/19945
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug(service-worker): `/` path is omitted by ngsw-config","articleBody":"\u003c!--\r\nPLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.\r\n\r\nISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.\r\n-->\r\n\r\n## I'm submitting a...\r\n\u003c!-- Check one of the following options with \"x\" -->\r\n\u003cpre>\u003ccode>\r\n[ ] Regression (a behavior that used to work and stopped working in a new release)\r\n[x] Bug report \u003c!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[ ] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n\u003c/code>\u003c/pre>\r\n\r\n## Current behavior\r\n\u003c!-- Describe how the issue manifests. -->\r\n\r\nCurrently, an index path, `/`, is omitted by `ngsw-config` command. It was supported as `routing` in old ngsw version.\r\n\r\n```\r\n$ ngsw-config ./src ./src/ngsw.base.json\r\n```\r\n\r\nngsw.base.json \r\n```\r\n{\r\n \"index\": \"src/index.html\",\r\n \"assetGroups\": [\r\n {\r\n \"name\": \"site\",\r\n \"mode\": \"prefetch\",\r\n \"resources\": {\r\n \"files\": [\r\n \"/\",\r\n \"/favicon.ico\",\r\n \"/index.html\"\r\n ],\r\n \"urls\": [\r\n \"https://fonts.googleapis.com/**\"\r\n ],\r\n \"versionedFiles\": [\r\n \"/*.bundle.css\",\r\n \"/*.bundle.js\",\r\n \"/*.chunk.js\"\r\n ]\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n\r\nGenerated ngsw.json\r\n```\r\n{\r\n \"configVersion\": 1,\r\n \"index\": \"/src/index.html\",\r\n \"assetGroups\": [\r\n {\r\n \"name\": \"site\",\r\n \"installMode\": \"prefetch\",\r\n \"updateMode\": \"prefetch\",\r\n \"urls\": [\r\n \"/favicon.ico\",\r\n \"/index.html\"\r\n ],\r\n \"patterns\": [\r\n \"https:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/.*\"\r\n ]\r\n }\r\n ],\r\n \"dataGroups\": [],\r\n \"hashTable\": {\r\n \"/favicon.ico\": \"84161b857f5c547e3699ddfbffc6d8d737542e01\",\r\n \"/index.html\": \"e5defb09b5dadd8903d71b868022bf69fc954f39\"\r\n }\r\n}\r\n```\r\n\r\n\r\n\r\n## Expected behavior\r\n\r\n`/` should be emitted as `urls` to cache index.html for offline support.\r\n\r\n```\r\n{\r\n \"configVersion\": 1,\r\n \"index\": \"/src/index.html\",\r\n \"assetGroups\": [\r\n {\r\n \"name\": \"site\",\r\n \"installMode\": \"prefetch\",\r\n \"updateMode\": \"prefetch\",\r\n \"urls\": [\r\n \"/\", // \u003c= should be in here\r\n \"/favicon.ico\",\r\n \"/index.html\"\r\n ],\r\n \"patterns\": [\r\n \"https:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/.*\"\r\n ]\r\n }\r\n ],\r\n \"dataGroups\": [],\r\n \"hashTable\": {\r\n \"/favicon.ico\": \"84161b857f5c547e3699ddfbffc6d8d737542e01\",\r\n \"/index.html\": \"e5defb09b5dadd8903d71b868022bf69fc954f39\"\r\n }\r\n}\r\n```\r\n\r\n## Minimal reproduction of the problem with instructions\r\n\r\n## What is the motivation / use case for changing the behavior?\r\n\r\nI tried to migrate my app to new ngsw with https://github.com/angular/angular/pull/19795 as a referrence. But `index.html` is never cached. \r\n\r\n## Environment\r\n\r\nAngular CLI: 1.5.0-rc.3\r\nNode: 6.11.2\r\nOS: darwin x64\r\nAngular: 5.0.0-rc.6\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router, service-worker\r\n \r\ncc/ @alxhub @webmaxru","author":{"url":"https://github.com/lacolaco","@type":"Person","name":"lacolaco"},"datePublished":"2017-10-26T13:48:18Z","url":"https://github.com/angular/angular/issues/19945"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7da8bdb5-7f8b-b7e7-ba7d-73de4e1a8189 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 883A:237673:94991E:C7E868:6B00E898 |
| html-safe-nonce | ae0b94c4b126654f5254a3af3e842ade4e7d67307f2dd73eb9873e45b1aa9d26 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODNBOjIzNzY3Mzo5NDk5MUU6QzdFODY4OjZCMDBFODk4IiwidmlzaXRvcl9pZCI6IjYzMDA2NDQzOTI4MzUyNzkwMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d2a192bf766e3034298173451f224328ace1011147aebe57bba0a4a5315c3d72 |
| hovercard-subject-tag | issue:268766812 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/19945/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ea94b44e16d3167560e7459e3ea7ed72de8075f27dc73ee1402cfd6be3535f65/angular/angular/issues/19945 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ea94b44e16d3167560e7459e3ea7ed72de8075f27dc73ee1402cfd6be3535f65/angular/angular/issues/19945 |
| og:image:alt | I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => P... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lacolaco |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width