From fda2341e63069d3a4fce54f26971b49b21926a79 Mon Sep 17 00:00:00 2001 From: Nicholas Zuber Date: Sat, 6 Apr 2019 16:04:12 -0400 Subject: [PATCH] Deployments with now --- config/webpack.config.prod.js | 4 ++-- now.json | 19 +++++++++++++++++++ package.json | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 now.json diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 0c6924f..310a53a 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -19,8 +19,8 @@ const paths = require('./paths'); const getClientEnvironment = require('./env'); const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin'); -const gitHash = execSync('git rev-parse --short HEAD').toString().trim(); - +// const gitHash = execSync('git rev-parse --short HEAD').toString().trim(); +const gitHash = ''; // Webpack uses `publicPath` to determine where the app is being served from. // It requires a trailing slash, or the file assets will get an incorrect path. diff --git a/now.json b/now.json new file mode 100644 index 0000000..a17703c --- /dev/null +++ b/now.json @@ -0,0 +1,19 @@ +{ + "version": 2, + "name": "meteorite", + "alias": "meteorite.dev", + "builds": [{ + "src": "package.json", + "use": "@now/static-build", + "config": {"distDir": "build"} + }], + "routes": [ + {"src": "^/static/(.*)", "dest": "/static/$1"}, + {"src": "^/favicon.ico", "dest": "/favicon.ico"}, + {"src": "^/manifest.json", "dest": "/manifest.json"}, + {"src": "^/(.*)", "dest": "/index.html"} + ], + "github": { + "enabled": false + } +} diff --git a/package.json b/package.json index fc9ba78..aa35926 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "scripts": { "start": "node scripts/start.js", "build": "node scripts/build.js && cp build/index.html build/200.html", + "now-build": "npm run build", "test": "node scripts/test.js", "deploy": "npm run build && surge ./build" },