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", "version": "1.0.0",
"description": "Bundle js-ipfs with WebPack", "description": "Bundle js-ipfs with WebPack",
"scripts": { "scripts": {
@ -13,7 +13,8 @@
"babel-loader": "^7.1.2", "babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"webpack": "^3.10.0", "webpack": "^3.10.0",
"webpack-dev-server": "^2.9.7" "webpack-dev-server": "^2.9.7",
"uglifyjs-webpack-plugin": "^1.1.4"
}, },
"dependencies": { "dependencies": {
"ipfs": "0.27.5" "ipfs": "0.27.5"

View File

@ -2,7 +2,7 @@
var path = require('path') var path = require('path')
var webpack = require('webpack') var webpack = require('webpack')
//const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = { module.exports = {
devtool: 'source-map', devtool: 'source-map',
@ -17,7 +17,7 @@ module.exports = {
publicPath: '/ipfs/' publicPath: '/ipfs/'
}, },
plugins: [ plugins: [
// new UglifyJSPlugin() new UglifyJSPlugin({sourceMap: true})
], ],
module: { module: {
loaders: [ loaders: [
@ -25,12 +25,12 @@ module.exports = {
test: /\.js$/, test: /\.js$/,
include: path.join(__dirname, 'src'), include: path.join(__dirname, 'src'),
exclude: [/fetcher/], exclude: [/fetcher/],
loader: "babel-loader" loader: 'babel-loader'
}, },
{ {
test: /\.js$/, test: /\.js$/,
include: [/fetcher/], include: [/fetcher/],
loader: "babel-loader" loader: 'babel-loader'
} }
] ]
}, },