From 6213407f544e34c13a4d125136d14a1d888d8c6a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 29 May 2017 13:27:26 +0200 Subject: Refactor test commands --- webpack.config.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index 7b7b10b52..9718477aa 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,12 +3,17 @@ */ const webpack = require('webpack'); const path = require('path'); +const PROD = process.env.NODE_ENV === 'production'; + +let entry = { + '0x': './src/0x.js.ts', +}; +if (PROD) { + entry = Object.assign({}, entry, {'0x.min': './src/0x.js.ts'}); +} module.exports = { - entry: { - '0x': './src/0x.js.ts', - '0x.min': './src/0x.js.ts' - }, + entry, output: { path: path.resolve(__dirname, '_bundles'), filename: '[name].js', -- cgit