mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-03-15 02:20:50 +00:00
Move build to webpack
This commit is contained in:
parent
abcc02bf0b
commit
37e9d9507f
@ -41,10 +41,9 @@
|
||||
"url": "git://github.com/internetarchive/dweb-transports.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "browserify ./index.js > ./dist/dweb-transports-bundle.js",
|
||||
"watch": "watchify ./index.js -o dist/dweb-transports-bundle.js --verbose",
|
||||
"build": "webpack --mode development",
|
||||
"test": "cd src; node ./test.js",
|
||||
"help": "echo 'test (test it)'; echo 'bundle (packs into ../examples)'; echo 'watch: continually bundles whenever files change'"
|
||||
"help": "echo 'test (test it)'; echo 'build (creates dweb-transports-bundle)'"
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
||||
|
27
webpack.config.js
Normal file
27
webpack.config.js
Normal file
@ -0,0 +1,27 @@
|
||||
module.exports = {
|
||||
entry: {
|
||||
'dweb-transports': './index.js',
|
||||
},
|
||||
output: {
|
||||
filename: '[name]-bundle.js',
|
||||
path: __dirname + '/dist'
|
||||
},
|
||||
node: {
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
crypto: 'empty',
|
||||
process: true,
|
||||
module: false,
|
||||
clearImmediate: false,
|
||||
Buffer: true,
|
||||
setImmediate: false,
|
||||
console: false
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
zlib: 'browserify-zlib-next'
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user