You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/deployment.md
+60-1Lines changed: 60 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,66 @@ See [vue-cli-plugin-s3-deploy](https://github.com/multiplegeorges/vue-cli-plugin
92
92
93
93
### Firebase
94
94
95
-
> TODO | Open to contribution.
95
+
Create a new Firebase project on your [Firebase console](https://console.firebase.google.com). Please refer to this [documentation](https://firebase.google.com/docs/web/setup) on how to setup your project.
96
+
97
+
Make sure you have installed [firebase-tools](https://github.com/firebase/firebase-tools) globally:
98
+
99
+
```
100
+
npm install -g firebase-tools
101
+
```
102
+
103
+
From the root of your project, initialize `firebase` using the command:
104
+
105
+
```
106
+
firebase init
107
+
```
108
+
109
+
Firebase will ask some questions on how to setup your project.
110
+
111
+
- Choose which Firebase CLI features you want to setup your project. Make sure to select `hosting`.
112
+
- Select the default Firebase project for your project.
113
+
- Set your `public` directory to `dist` (or where your build's output is) which will be uploaded to Firebase Hosting.
114
+
115
+
```javascript
116
+
// firebase.json
117
+
118
+
{
119
+
"hosting": {
120
+
"public":"app"
121
+
}
122
+
}
123
+
```
124
+
125
+
- Select `yes` to configure your project as a single-page app. This will create an `index.html` and on your `dist` folder and configure your `hosting` information.
126
+
127
+
```javascript
128
+
// firebase.json
129
+
130
+
{
131
+
"hosting": {
132
+
"rewrites": [
133
+
{
134
+
"source":"**",
135
+
"destination":"/index.html"
136
+
}
137
+
]
138
+
}
139
+
}
140
+
```
141
+
142
+
Run `npm run build` to build your project.
143
+
144
+
To deploy your project on Firebase Hosting, run the command:
145
+
146
+
```
147
+
firebase deploy --only hosting
148
+
```
149
+
150
+
If you want other Firebase CLI features you use on your project to be deployed, run `firebase deploy` without the `--only` option.
151
+
152
+
You can now access your project on `https://<YOUR-PROJECT-ID>.firebaseapp.com`.
153
+
154
+
Please refer on the [Firebase Documentation](https://firebase.google.com/docs/hosting/deploying) for more details.
0 commit comments