I am looking for a tutorial on how to properly setup the firebase-tools
hosting on my angular 6.0 projects, and what I found is always like this.
- firebase init - then select the Hosting - What do you want to use as your public directory? dist - Configure as a single-page app (rewrite all urls to /index.html)? Yes - Overwrite? No - ng build --prod - firebase deploy
but after doing this, this is always what I've got.
You cannot change hosted files in the Firebase Console. Instead, you should change the index. html on your local copy where you initially ran the firebase deploy command. Once you're done with the changes, run firebase deploy again to push the updated version of your website to Firebase Hosting.
I found that the ng build --prod
will create a dist
and an another subfolder under this where the project location is.
dist |--TheProject_Folder | |--assets|index.html - This index html is not using. |--index.html - This is the html generated in the firebase init
So what I did is to initialize again the firebase init
and change the public directory from dist
to dist/TheProject_Folder
:
- What do you want to use as your public directory? dist/TheProject_Folder - Configure as a single-page app (rewrite all urls to /index.html)? Yes - Overwrite? No
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With