diff --git a/package.json b/package.json index 922d1c3..c89cf0d 100644 --- a/package.json +++ b/package.json @@ -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": [], diff --git a/webpack.config.js b/webpack.config.js index 1a4793d..8625f02 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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' } - } -} \ No newline at end of file + }, + plugins: [ + new UglifyJsPlugin({ + uglifyOptions: { + compress: { + unused: false + } + } + }) + ] +}