Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/template/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
Expand Down