Skip to content

Deploy to now version 2 #3000

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
34 changes: 34 additions & 0 deletions docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,40 @@ npm install -g now
```

This will automatically point your site's alias to the latest deployment. Now, just run `npm run deploy` to deploy your app.


#### Now v2

With version 2 you need to do some changes [docs here](https://zeit.co/docs/v2/deployments/official-builders/static-build-now-static-build)

Note: there seems to be an issue when cypress or `@vue/cli-plugin-e2e-cypress` is installed even as a dev dependency. More details [here](https://spectrum.chat/zeit/general/deploy-vue-vuex-app~be182837-1312-43a6-a7f7-70580958d1f4)

1. `now.json` file is different for version 2:

```
{
"version": 2,
"name": "your-app-name-here",
"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" }
]
}
```

2. Add `.nowignore` file to your project root:

```
node_modules
dist
```

3. You can now add the deployment scripts

### Stdlib

Expand Down