mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-05-20 22:06:36 +00:00

Use p2p-websocket-star addresses Fix minified example: don't compress Use non-minified ipfs build for browser examples Add non-minified build files to browser examples Update build
55 lines
1.0 KiB
JavaScript
55 lines
1.0 KiB
JavaScript
'use strict'
|
|
|
|
const path = require('path')
|
|
const webpack = require('webpack')
|
|
const Uglify = require('uglifyjs-webpack-plugin')
|
|
|
|
const uglifyOptions = {
|
|
uglifyOptions: {
|
|
mangle: false,
|
|
compress: false,
|
|
},
|
|
}
|
|
|
|
module.exports = {
|
|
entry: './examples/browser/browser-webpack-example/index.js',
|
|
output: {
|
|
filename: './examples/browser/browser-webpack-example/bundle.js'
|
|
},
|
|
target: 'web',
|
|
devtool: 'none',
|
|
node: {
|
|
console: false,
|
|
Buffer: true,
|
|
process: 'mock',
|
|
},
|
|
externals: {
|
|
fs: '{}',
|
|
mkdirp: '{}',
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
'process.env': {
|
|
'NODE_ENV': JSON.stringify(process.env.NODE_ENV)
|
|
}
|
|
}),
|
|
new Uglify(uglifyOptions),
|
|
],
|
|
resolve: {
|
|
modules: [
|
|
'node_modules',
|
|
path.resolve(__dirname, '../node_modules')
|
|
],
|
|
alias: {
|
|
leveldown: 'level-js',
|
|
},
|
|
},
|
|
resolveLoader: {
|
|
modules: [
|
|
'node_modules',
|
|
path.resolve(__dirname, '../node_modules')
|
|
],
|
|
moduleExtensions: ['-loader']
|
|
},
|
|
}
|