From c25d907dd19b004a59b32abc58472607df11eec3 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 26 Dec 2017 10:22:53 -0800 Subject: [PATCH] Fixing prod build. --- package.json | 5 +++-- webpack.config.js | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 9b79083..1304d5c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "bundle-webpack", + "name": "intergalactic", "version": "1.0.0", "description": "Bundle js-ipfs with WebPack", "scripts": { @@ -13,7 +13,8 @@ "babel-loader": "^7.1.2", "babel-preset-env": "^1.6.1", "webpack": "^3.10.0", - "webpack-dev-server": "^2.9.7" + "webpack-dev-server": "^2.9.7", + "uglifyjs-webpack-plugin": "^1.1.4" }, "dependencies": { "ipfs": "0.27.5" diff --git a/webpack.config.js b/webpack.config.js index 863fa01..1279709 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,7 +2,7 @@ var path = require('path') var webpack = require('webpack') -//const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); +const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); module.exports = { devtool: 'source-map', @@ -17,7 +17,7 @@ module.exports = { publicPath: '/ipfs/' }, plugins: [ -// new UglifyJSPlugin() + new UglifyJSPlugin({sourceMap: true}) ], module: { loaders: [ @@ -25,12 +25,12 @@ module.exports = { test: /\.js$/, include: path.join(__dirname, 'src'), exclude: [/fetcher/], - loader: "babel-loader" + loader: 'babel-loader' }, { test: /\.js$/, include: [/fetcher/], - loader: "babel-loader" + loader: 'babel-loader' } ] },