2017-03-31 10:54:56 +02:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const path = require('path')
|
|
|
|
const Uglify = require('uglifyjs-webpack-plugin')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: './src/OrbitDB.js',
|
|
|
|
output: {
|
|
|
|
libraryTarget: 'var',
|
|
|
|
library: 'OrbitDB',
|
|
|
|
filename: './dist/orbitdb.js'
|
|
|
|
},
|
|
|
|
target: 'web',
|
2017-12-31 15:53:25 +01:00
|
|
|
devtool: 'source-map',
|
2017-03-31 10:54:56 +02:00
|
|
|
externals: {
|
|
|
|
fs: '{}',
|
2017-12-06 13:08:31 +01:00
|
|
|
mkdirp: '{}',
|
2017-03-31 10:54:56 +02:00
|
|
|
},
|
|
|
|
node: {
|
|
|
|
console: false,
|
|
|
|
Buffer: true
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
modules: [
|
|
|
|
'node_modules',
|
|
|
|
path.resolve(__dirname, '../node_modules')
|
2017-12-06 13:08:31 +01:00
|
|
|
],
|
|
|
|
alias: {
|
|
|
|
leveldown: 'level-js',
|
|
|
|
},
|
2017-03-31 10:54:56 +02:00
|
|
|
},
|
|
|
|
resolveLoader: {
|
|
|
|
modules: [
|
|
|
|
'node_modules',
|
|
|
|
path.resolve(__dirname, '../node_modules')
|
|
|
|
],
|
|
|
|
moduleExtensions: ['-loader']
|
|
|
|
},
|
|
|
|
}
|