diff --git a/package.json b/package.json index b5112e3..0540f4b 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "dist/react-section.min.js", "scripts": { "dev": "webpack-dev-server --inline --hot --content-base demo/", - "build": "export WEBPACK=prod && babel-node scripts/build", - "build.demo": "export WEBPACK=demo && webpack", + "build": "WEBPACK=prod babel-node scripts/build", + "build.demo": "WEBPACK=demo webpack", "test": "nyc ava -v", "test.watch": "nyc ava -vw", "test.ui": "nightwatch", diff --git a/webpack.config.js b/webpack.config.js index 2aa6a9f..90d09ce 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ -const isDemo = process.env.WEBPACK === 'demo' -const isDev = !process.env.WEBPACK -const isProd = process.env.WEBPACK === 'prod' +const webpackEnv = process.env.WEBPACK +const isDemo = webpackEnv === 'demo' +const isDev = !webpackEnv +const isProd = webpackEnv === 'prod' const webpack = require('webpack') const ExtractText = require('extract-text-webpack-plugin')