From 296a07b65d222eb3193dd6b3a2379995cda04114 Mon Sep 17 00:00:00 2001 From: Virgiel <35613972+Virgiel@users.noreply.github.com> Date: Sun, 3 Mar 2019 16:29:28 +0100 Subject: [PATCH] Update deployment.md for Now 2 Update the example for Now with Now Platform 2.0 template --- docs/guide/deployment.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/guide/deployment.md b/docs/guide/deployment.md index f6e44b250c..e7f93cf13d 100644 --- a/docs/guide/deployment.md +++ b/docs/guide/deployment.md @@ -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`: