Firebase CLI: “Configure as a single-page app (rewrite all urls to /index.html)”
问题 I just used the Firebase CLI to init a static hosting project. What exactly happens when you enable the "configure as a single-page app" option? I'm looking for a description of exactly which files are modified, and what kind of effect this has on the Firebase backend. 回答1: That option simply sets a flag in the firebase.json file to redirect all URLs to /index.html . "rewrites": [ { "source": "**", "destination": "/index.html" } ] See the documentation of Firebase Hosting for more information