From 8024fc9ad9b9b3cc96017a28472faa7e9f0fedbe Mon Sep 17 00:00:00 2001 From: Rene Date: Mon, 11 Sep 2017 19:15:21 +0200 Subject: [PATCH 1/2] add configuration for Firebase hosting --- docs/en/essentials/history-mode.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/en/essentials/history-mode.md b/docs/en/essentials/history-mode.md index 3ef4d07e7..69d4afbe5 100644 --- a/docs/en/essentials/history-mode.md +++ b/docs/en/essentials/history-mode.md @@ -102,6 +102,22 @@ rewrite { } ``` +#### Firebase hosting + +``` +{ + "hosting": { + "public": "dist", + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +} +``` + ## Caveat There is a caveat to this: Your server will no longer report 404 errors as all not-found paths now serve up your `index.html` file. To get around the issue, you should implement a catch-all route within your Vue app to show a 404 page: From da3bdd8dd9a56d3bd7ea87e627785b6c292d7458 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Sun, 8 Oct 2017 12:41:08 +0200 Subject: [PATCH 2/2] Update history-mode.md --- docs/en/essentials/history-mode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/essentials/history-mode.md b/docs/en/essentials/history-mode.md index 69d4afbe5..1ea4c0641 100644 --- a/docs/en/essentials/history-mode.md +++ b/docs/en/essentials/history-mode.md @@ -104,6 +104,8 @@ rewrite { #### Firebase hosting +Add this to your `firebase.json`: + ``` { "hosting": {