问题
I want to develop the angular 6 apps, but after deploying firebase showing only welcome page.
Here are the steps I have taken to deploy.
- installed firebase-tools
- ng build --prod (in my app)
- firebase init
- Are you ready to proceed? (Y/n) y
- (*) Hosting: Configure and deploy Firebase Hosting sites
- What do you want to use as your public directory? (public) dist
- Configure as a single-page app (rewrite all urls to /index.html)? (y/N) y
- File dist/index.html already exists. Overwrite? (y/N) y
- Firebase initialization complete!
- In this step, I have deleted dist folder and run
ng build --prodagain - angular build app in a subfolder inside
distdirectory hence I copied all the content from the subdirectory which contains index.html todist/. - firebase deploy
- firebase open hosting:site
but after doing all that I am still getting welcome page in the link.
What am I doing wrong!?
回答1:
Try: 8. File dist/index.html already exists. Overwrite? (y/N) N and open link to your app in incognito mode. Seriously, I stuck for hours because this firebase index got cached in my case, so this was the reason why I could't see my app after deploy.
来源:https://stackoverflow.com/questions/56447027/firebase-hosting-showing-welcome-page-after-deploying-angular-6-app