orbitdb/conf/webpack.example.config.js
haad 8f990e0ccc Immutable ipfs-log
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).
2017-03-21 18:13:58 +01:00

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'
}