From 338e1553f9dd483354cdeca5e501f6d99be128bb Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sun, 17 Sep 2017 12:58:34 -0700 Subject: [PATCH] Make build work --- next.config.js | 8 ++++++++ package.json | 2 +- server.js | 2 +- yarn.lock | 6 +++--- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 next.config.js diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..424941e --- /dev/null +++ b/next.config.js @@ -0,0 +1,8 @@ +module.exports = { + // TODO remove `next.configs.js` when this closes: https://github.com/zeit/next.js/issues/1195 + webpack (cfg) { + cfg.plugins = cfg.plugins + .filter(plugin => (plugin.constructor.name !== 'UglifyJsPlugin')) + return cfg + }, +} diff --git a/package.json b/package.json index b5ae192..181308d 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react-spinkit": "^3.0.0", "react-spinner": "^0.2.7", "react-syntax-highlight": "^0.0.6", - "tohash": "^1.0.0", + "tohash": "^1.0.2", "twitter": "^1.7.1" }, "now": { diff --git a/server.js b/server.js index 7dda6d1..63ca27b 100644 --- a/server.js +++ b/server.js @@ -4,7 +4,7 @@ const bodyParser = require('body-parser') const next = require('next') const port = parseInt(process.env.PORT, 10) || 3000 -const dev = process.env.NODE_ENV !== 'production' +const dev = process.env.NODE_ENV !== 'production' && !process.env.NOW const app = next({ dev }) const handle = app.getRequestHandler() diff --git a/yarn.lock b/yarn.lock index 9984772..cbde3fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3526,9 +3526,9 @@ to-fast-properties@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" -tohash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tohash/-/tohash-1.0.0.tgz#cd740231ca16821e3744f2f18ff9727382eeb091" +tohash@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tohash/-/tohash-1.0.2.tgz#9e66e497da0cfd77ba85f9663065adf2d8c99981" touch@3.1.0: version "3.1.0"