Attempt to uglify seems to work

This commit is contained in:
Mitra Ardron 2018-07-11 14:47:29 -07:00
parent 2c3c0f4272
commit 618b5710dd
2 changed files with 15 additions and 3 deletions

View File

@ -17,6 +17,7 @@
"ipfs-unixfs": "^0.1.15",
"node-fetch": "latest",
"readable-stream": "latest",
"webpack": "^4.16.0",
"webtorrent": "^0.99.3",
"y-array": "latest",
"y-indexeddb": "latest",
@ -30,7 +31,8 @@
"devDependencies": {
"browserify": "^14.5.0",
"watchify": "^3.11.0",
"chai": "latest"
"chai": "latest",
"uglifyjs-webpack-plugin": "latest"
},
"homepage": "https://github.com/internetarchive/dweb-transports#readme",
"keywords": [],

View File

@ -1,3 +1,4 @@
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry: {
'dweb-transports': './index.js',
@ -23,5 +24,14 @@ module.exports = {
alias: {
zlib: 'browserify-zlib-next'
}
}
},
plugins: [
new UglifyJsPlugin({
uglifyOptions: {
compress: {
unused: false
}
}
})
]
}