From 28b6aa851face148a76ab4cfbf07b60b1506b4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rami=20Ker=C3=A4nen?= Date: Sun, 29 Oct 2017 17:09:48 +0000 Subject: [PATCH] Change the default `start_url` to `.` --- packages/react-scripts/template/README.md | 6 ------ packages/react-scripts/template/public/manifest.json | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 7cf2db5d554..e5acc6b773e 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1836,12 +1836,6 @@ service worker navigation routing can be configured or disabled by and [`navigateFallbackWhitelist`](https://github.com/GoogleChrome/sw-precache#navigatefallbackwhitelist-arrayregexp) options of the `SWPreachePlugin` [configuration](../config/webpack.config.prod.js). -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": ".", -``` - ### Building for Relative Paths By default, Create React App produces a build assuming your app is hosted at the server root.
diff --git a/packages/react-scripts/template/public/manifest.json b/packages/react-scripts/template/public/manifest.json index 36680959d1f..a4d33954e8d 100644 --- a/packages/react-scripts/template/public/manifest.json +++ b/packages/react-scripts/template/public/manifest.json @@ -8,7 +8,7 @@ "type": "image/png" } ], - "start_url": "./index.html", + "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff"