Mercurial > hg > thermostat-ng > web-client
changeset 162:94e4337238f9
Produce minified build in testing environment
Reviewed-by: jkang
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-August/024576.html
author | Andrew Azores <aazores@redhat.com> |
---|---|
date | Fri, 18 Aug 2017 10:31:04 -0400 |
parents | 67492977d9ac |
children | c029b9611981 |
files | webpack.config.js |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/webpack.config.js Tue Aug 22 08:52:48 2017 -0400 +++ b/webpack.config.js Fri Aug 18 10:31:04 2017 -0400 @@ -35,6 +35,7 @@ var ENV = process.env.npm_lifecycle_event; var isTest = ENV === 'test' || ENV === 'test-watch'; var isProd = process.env.NODE_ENV === 'production'; +var isTesting = process.env.NODE_ENV === 'testing'; module.exports = function () { var config = {}; @@ -68,7 +69,7 @@ if (isTest) { config.devtool = 'inline-source-map'; - } else if (isProd) { + } else if (isProd || isTesting) { config.devtool = 'source-map'; } else { config.devtool = 'eval-source-map'; @@ -123,7 +124,7 @@ }) ); - if (isProd) { + if ((isProd || isTesting) && !isTest) { config.plugins.push( new webpack.optimize.UglifyJsPlugin({ sourceMap: true