diff options
author | Fabio Berger <me@fabioberger.com> | 2017-05-29 22:04:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-29 22:04:13 +0800 |
commit | abd0228ba8b71b35ff089fc647674caa08d7a24e (patch) | |
tree | 9da41caf73bf7c924071981fcbebe4732076adcb /webpack.config.js | |
parent | 232e03195974403878f303a59f0ff8669b54f205 (diff) | |
parent | 7bd3d87f7a7d7c54b08e3e62b8075ec569498c63 (diff) | |
download | dexon-sol-tools-abd0228ba8b71b35ff089fc647674caa08d7a24e.tar.gz dexon-sol-tools-abd0228ba8b71b35ff089fc647674caa08d7a24e.tar.zst dexon-sol-tools-abd0228ba8b71b35ff089fc647674caa08d7a24e.zip |
Merge pull request #16 from 0xProject/umd-tests
Umd tests
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/webpack.config.js b/webpack.config.js index 67af51f7a..03a7c6cac 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,14 +1,20 @@ /** * This is to generate the umd bundle only */ +const lodash = require('lodash'); const webpack = require('webpack'); const path = require('path'); +const production = process.env.NODE_ENV === 'production'; + +let entry = { + '0x': './src/0x.js.ts', +}; +if (production) { + entry = _.assign({}, entry, {'0x.min': './src/0x.js.ts'}); +} module.exports = { - entry: { - '0x': './src/ts/0x.js.ts', - '0x.min': './src/ts/0x.js.ts' - }, + entry, output: { path: path.resolve(__dirname, '_bundles'), filename: '[name].js', |