mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-04-25 14:52:18 +00:00
Fix debug in production webpack (same change made on dweb-transports dweb-objects and dweb-archive)
This commit is contained in:
parent
2ec151a008
commit
d84e5468d8
@ -49,5 +49,5 @@
|
|||||||
"test": "cd src; node ./test.js",
|
"test": "cd src; node ./test.js",
|
||||||
"help": "echo 'test (test it)'; echo 'build (creates dweb-transports-bundle)'"
|
"help": "echo 'test (test it)'; echo 'build (creates dweb-transports-bundle)'"
|
||||||
},
|
},
|
||||||
"version": "0.1.12"
|
"version": "0.1.13"
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: {
|
||||||
'dweb-transports': './index.js',
|
'dweb-transports': './index.js',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: '[name]-bundle.js',
|
filename: '[name]-bundle.js',
|
||||||
path: __dirname + '/dist'
|
path: __dirname + '/dist'
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
fs: 'empty',
|
fs: 'empty',
|
||||||
net: 'empty',
|
net: 'empty',
|
||||||
@ -25,13 +25,18 @@ module.exports = {
|
|||||||
zlib: 'browserify-zlib-next'
|
zlib: 'browserify-zlib-next'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
optimization: {
|
||||||
new UglifyJsPlugin({
|
minimizer: [
|
||||||
uglifyOptions: {
|
new UglifyJsPlugin({
|
||||||
compress: {
|
uglifyOptions: {
|
||||||
unused: false
|
compress: {
|
||||||
|
unused: false,
|
||||||
|
collapse_vars: false // debug has a problem in production without this.
|
||||||
|
}
|
||||||
|
|
||||||
|
//compress: false
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
]
|
||||||
]
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user