mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00

Use immutable ipfs-log. Simplify internals. Remove obsolete dependencies. Update dependencies. Use @dignifiedquire's mapSeries for Promises. Split tests to individual stores. Improve tests. Fix build process. Build size down to 121kb. Fix benchmarks and examples. Move Cache to Stores (and to its own module).
61 lines
1.2 KiB
JavaScript
61 lines
1.2 KiB
JavaScript
const webpack = require('webpack')
|
|
const path = require('path')
|
|
|
|
module.exports = {
|
|
entry: './examples/browser/index.js',
|
|
output: {
|
|
filename: './examples/browser/bundle.js'
|
|
},
|
|
devtool: 'sourcemap',
|
|
stats: {
|
|
colors: true,
|
|
cached: false
|
|
},
|
|
node: {
|
|
console: false,
|
|
process: 'mock',
|
|
Buffer: true
|
|
},
|
|
plugins: [
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
mangle: false,
|
|
compress: { warnings: false }
|
|
})
|
|
],
|
|
resolve: {
|
|
modules: [
|
|
'node_modules',
|
|
path.resolve(__dirname, '../node_modules')
|
|
],
|
|
alias: {
|
|
// These are needed because node-libs-browser depends on outdated
|
|
// versions
|
|
//
|
|
// Can be dropped once https://github.com/devongovett/browserify-zlib/pull/18
|
|
// is shipped
|
|
zlib: 'browserify-zlib-next',
|
|
// Can be dropped once https://github.com/webpack/node-libs-browser/pull/41
|
|
// is shipped
|
|
http: 'stream-http'
|
|
}
|
|
},
|
|
resolveLoader: {
|
|
modules: [
|
|
'node_modules',
|
|
path.resolve(__dirname, '../node_modules')
|
|
],
|
|
moduleExtensions: ['-loader']
|
|
},
|
|
module: {
|
|
rules: [{
|
|
test: /\.json$/,
|
|
loader: 'json-loader'
|
|
}]
|
|
},
|
|
node: {
|
|
Buffer: true
|
|
},
|
|
plugins: [],
|
|
target: 'web'
|
|
}
|