From 6ed9ffa7a65a49a8ed0545e4de82f8aabc5a87fd Mon Sep 17 00:00:00 2001 From: Yuki Kodama Date: Mon, 10 Oct 2016 18:27:20 +0900 Subject: [PATCH] Enable uglify --- webpack.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index fa18926..0058179 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,7 @@ 'use strict'; +var webpack = require('webpack'); + module.exports = { entry: { autocomplete: './autocomplete/index.js', @@ -23,5 +25,9 @@ module.exports = { filename: '[name].bundle.js', publicPath: '/in-memory' }, - devtool: 'inline-source-map' + plugins: (process.env.NODE_ENV === 'production') ? [ + new webpack.optimize.UglifyJsPlugin({ + compress: { warnings: false } + }) + ] : [] };