Fix: Angular 6 and Firebase Hosting/Deployment Error

I was just trying to post my AngularFire app to Firebase hosting and I was getting the "Firebase hosting setup complete" alert page. I couldn't find the fix online, so I'll post it here.

The Problem:

When you run ng build --prod, Angular now places the build files in dist/app-name/, but prior to ng6 it would place the build files in dist/. So when you're uploading the files, Firebase ends up looking in the dist folder (probably where you're used to setting your firebase init public folder).

The Fix:

Open up your angular.json file and change

"outputPath": "dist/your-firebase-app-name",

to

"outputPath": "dist",

You should now be able to run your firebase init setup as you normally would have in Angular 5--.