If you're using @angular/cli
to build the project you'll want your firebase.json
file to be set up in the following way (disregarding database and other rules):
{
"hosting": {
"public": "dist",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
You want to be sure that the firebase.json
file is at the same directory level as the .angular-cli.json
and the built 'dist' folder generated by the cli.
The structure should look like this:
dist/
e2e/
src/
.angular-cli.json
firebase.json
Run ng build --prod
then firebase deploy
at the same level as firebase.json
and on success go to the URL provided the command line message of firebase-tools
. I'd do an "Empty Cache and Hard Reload" to clear the cache if you're using Chrome.
If you go to the firebase console for the project, in the Hosting dashboard, the number of files in the /dist
folder should match the number of files listed the most recent entry of "Deployment History".
Hopefully that helps!