From d8a8177f41403a71b5e7f2f0877072e3def92a94 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Tue, 13 Feb 2018 17:54:14 -0500 Subject: [PATCH] Setting NODE_ENV for builds --- package.json | 3 ++- yarn.lock | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c409b8e..b7dc4eb 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start": "webpack-dev-server --config webpack.dev.js", "start:prod": "run-s build start:http-server", "start:http-server": "http-server ./build", - "build": "run-s build:webpack build:prerender", + "build": "cross-env NODE_ENV=production run-s build:webpack build:prerender", "build:webpack": "webpack --config webpack.prod.js", "build:prerender": "node ./prerender/prerender.js", "test": "run-s test:lint 'test:unit --coverage'", @@ -59,6 +59,7 @@ "babel-register": "^6.26.0", "cheerio": "^1.0.0-rc.2", "copy-webpack-plugin": "^4.4.1", + "cross-env": "^5.1.3", "css-loader": "^0.28.9", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.1.1", diff --git a/yarn.lock b/yarn.lock index 66c7d36..161139d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1846,6 +1846,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-env@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.3.tgz#f8ae18faac87692b0a8b4d2f7000d4ec3a85dfd7" + dependencies: + cross-spawn "^5.1.0" + is-windows "^1.0.0" + cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -4089,6 +4096,10 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-windows@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" + is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"