Skip to content

Update deployment.md for Now 2 #3560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,25 +221,22 @@ npm install -g now

```json
{
"version": 2,
"name": "my-example-app",
"type": "static",
"static": {
"public": "dist",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"alias": "vue-example",
"files": [
"dist"
"builds": [
{"src": "package.json", "use": "@now/static-build"}
],
"routes": [
{"src": "^/js/(.*)", "dest": "/js/$1"},
{"src": "^/css/(.*)", "dest": "/css/$1"},
{"src": "^/img/(.*)", "dest": "/img/$1"},
{"src": ".*", "dest": "/index.html"}
]
}
```

You can further customize the static serving behavior by consulting [Now's documentation](https://zeit.co/docs/deployment-types/static).
You can further customize the serving behavior by consulting [Now's documentation](https://zeit.co/docs/v2/deployments/configuration/).

3. Adding a deployment script in `package.json`:

Expand Down