fcoin/webpack.config.js
Boyma Fahnbulleh 096aaaebb2
s/PATHS/paths
2017-06-26 13:51:33 -07:00

41 lines
780 B
JavaScript

const webpack = require('webpack')
const paths = {
bcoin: './lib/bcoin',
master: './lib/workers/master'
}
module.exports = {
entry: {
'bcoin': paths.bcoin,
'bcoin.min': paths.bcoin,
'bcoin-master': paths.master,
'bcoin-master.min': paths.master
},
output: {
path: './browser',
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.json'],
packageAlias: 'browser'
},
module: {
loaders: [
{ test: /\.js$/, loader: 'babel', exclude: /node_modules/ },
{ test: /\.json$/, loader: 'json' }
]
},
node: {
fs: 'empty'
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
include: /\.min\.js$/,
minimize: true
})
]
}