Skip to content

Commit 90e220c

Browse files
foochugaearon
authored andcommitted
Mention that start_url needs to be "." for client side routing
* Change template manifest start_url to dot to make it react-router friendly * Revert "Change template manifest start_url to dot to make it react-router friendly" This reverts commit 02f53e8. * Add a note about PWA manifest and client-side routing
1 parent 70a000b commit 90e220c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

template/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,12 @@ service worker navigation routing can be configured or disabled by
18361836
and [`navigateFallbackWhitelist`](https://github.com/GoogleChrome/sw-precache#navigatefallbackwhitelist-arrayregexp)
18371837
options of the `SWPreachePlugin` [configuration](../config/webpack.config.prod.js).
18381838
1839+
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:
1840+
1841+
```js
1842+
"start_url": ".",
1843+
```
1844+
18391845
### Building for Relative Paths
18401846
18411847
By default, Create React App produces a build assuming your app is hosted at the server root.<br>

0 commit comments

Comments
 (0)