A vue project template with support for firebase based on official webpack
vue init InCuca/vue-firebase my-project
Add firebase settings in config/dev.firebase.js
and config/prod.firebase.js
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
For a detailed explanation on how things work, check out the guide and docs for vue-loader.
- Install firebase-tools:
npm install -g firebase-tools
- Build the project with
npm run build
- Go to the firebase folder:
cd dist
- Set current project:
firebase use
orfirebase use --add
- To be able to send emails with your Gmail account: enable access to Less Secure Apps and Display Unlock Captcha. For accounts with 2-step verification enabled Generate an App Password.
- Set the
gmail.email
andgmail.password
Google Cloud environment variables to match the email and password of the Gmail account used to send emails (or the app password if your account has 2-step verification enabled). For this use:
firebase functions:config:set gmail.email="myusername@gmail.com" gmail.password="secretpassword"
- Deploy your project using
firebase deploy
- Open the app using
firebase open hosting:site
, this will open a browser.