mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-03-15 10:30:48 +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"
|
"url": "git://github.com/internetarchive/dweb-transports.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "browserify ./index.js > ./dist/dweb-transports-bundle.js",
|
"build": "webpack --mode development",
|
||||||
"watch": "watchify ./index.js -o dist/dweb-transports-bundle.js --verbose",
|
|
||||||
"test": "cd src; node ./test.js",
|
"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"
|
"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