orbit-db/conf/webpack.config.js
2021-09-05 20:08:30 -05:00

49 lines
868 B
JavaScript

'use strict'
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: './src/OrbitDB.js',
output: {
libraryTarget: 'var',
library: 'OrbitDB',
filename: '../dist/orbitdb.min.js'
},
mode: 'development',
target: 'web',
devtool: 'none',
externals: {
fs: '{}',
mkdirp: '{}'
},
node: {
console: false,
Buffer: true,
mkdirp: 'empty'
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
}
})
],
resolve: {
modules: [
'node_modules',
path.resolve(__dirname, '../node_modules')
],
alias: {
leveldown: 'level-js'
}
},
resolveLoader: {
modules: [
'node_modules',
path.resolve(__dirname, '../node_modules')
],
moduleExtensions: ['-loader']
}
}