-
Create your Firebase project on their dashboard: https://console.firebase.google.com/
-
Set up your environment variables on a
.env
file with this format. You can get the credentials from the Firebase Dashboard on Project Settings after you create a Firebase App.
VUE_APP_FIREBASE_API_KEY=
VUE_APP_FIREBASE_DB_URL=
VUE_APP_FIREBASE_PROJECT_ID=
VUE_APP_FIREBASE_APP_ID=
- Install Firebase CLI globally
yarn global add firebase-tools
Make sure you are also logged in on Firebase via CLI
firebase login
- Initialize Firebase project
firebase init
- Select Hosting on the list of features
- Select your Firebase project
- Set public directory to
dist
- Select
yes
to configure project as an SPA - Build your Vue application
yarn build
- Deploy your project to Firebase Hosting
firebase deploy --only hosting
- URL will be given after deployment. Done!
yarn install
yarn serve
yarn build
yarn lint