Fixing prod build.

This commit is contained in:
Dan 2017-12-26 10:22:53 -08:00
parent 4d2d321430
commit c25d907dd1
2 changed files with 7 additions and 6 deletions

View File

@ -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"

View File

@ -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'
}
]
},