diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 647e116a530..88c36f4d194 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1999,15 +1999,7 @@ If you’re using [Apache Tomcat](http://tomcat.apache.org/), you need to follow Now requests to `/todos/42` will be handled correctly both in development and in production. -When users install your app to the homescreen of their device the default -configuration will make a shortcut to `/index.html`. This may not work for -client-side routers which expect the app to be served from `/`. Edit the web app -manifest at [`public/manifest.json`](public/manifest.json) and change -`start_url` to match the required URL scheme, for example: - -```js - "start_url": ".", -``` +When users install your app to the homescreen of their device the default configuration will make a shortcut to `/`. This may not work if you don't use a client-side router and expect the app to be served from `/index.html`. In this case, the web app manifest at [`public/manifest.json`](public/manifest.json) and change `start_url` to `./index.html`. ### Service Worker Considerations @@ -2021,8 +2013,7 @@ and work without requiring a network connection. If you are using the `pushState` history API and would like to enable service worker support for navigations to URLs like `/todos/42`, you need to -[`npm eject`](#npm-run-eject) and enable the -[`navigateFallback`](https://github.com/GoogleChrome/sw-precache#navigatefallback-string) +[`npm eject`](#npm-run-eject) and enable the [`navigateFallback`](https://github.com/GoogleChrome/sw-precache#navigatefallback-string) and [`navigateFallbackWhitelist`](https://github.com/GoogleChrome/sw-precache#navigatefallbackwhitelist-arrayregexp) options of the `SWPreachePlugin` [configuration](../config/webpack.config.prod.js). diff --git a/packages/react-scripts/template/public/manifest.json b/packages/react-scripts/template/public/manifest.json index ef19ec243e7..1f2f141fafd 100644 --- a/packages/react-scripts/template/public/manifest.json +++ b/packages/react-scripts/template/public/manifest.json @@ -8,7 +8,7 @@ "type": "image/x-icon" } ], - "start_url": "./index.html", + "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff"