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
+41-37Lines changed: 41 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -267,71 +267,75 @@ Please refer to the [Firebase Documentation](https://firebase.google.com/docs/ho
267
267
268
268
This example uses the latest Now platform version 2.
269
269
270
-
1. Install the Now CLI globally:
270
+
1. Install the Now CLI:
271
271
272
272
```bash
273
273
npm install -g now
274
+
275
+
# Or, if you prefer a local one
276
+
npm install now
274
277
```
275
278
276
279
2. Add a `now.json` file to your project root:
277
280
278
281
```json
279
-
{
280
-
"name": "my-example-app",
281
-
"version": 2,
282
-
"builds": [
283
-
{ "src": "dist/**", "use": "@now/static" }
284
-
],
285
-
"routes": [
286
-
{ "src": "/(.*)", "dest": "dist/$1" }
287
-
],
288
-
"alias": "vue-example"
289
-
}
290
-
```
291
-
292
-
In case you want to deploy an application with router mode set to history, the config file should look like the following (if you have different folder names, update your config accordingly):
This additional config is required in order to avoid issues when directly deep-linking to a specific page (e.g. when opening `my-example-app.now.sh/some-subpage`, you would be presented with a 404 error otherwise).
301
+
```
321
302
322
-
3. Adding a deployment script in`package.json`:
303
+
If you have different/additional folders, modify the route accordingly:
0 commit comments