relay-cfg/webpack.config.js

30 lines
493 B
JavaScript
Raw Normal View History

2017-10-29 14:08:10 +00:00
'use strict';
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
target: 'web',
entry: {
'bcfg': './lib/bcfg'
},
output: {
library: 'bcfg',
libraryTarget: 'umd',
path: __dirname,
filename: '[name].js'
},
resolve: {
modules: ['node_modules'],
extensions: ['-browser.js', '.js', '.json']
},
module: {
rules: [{
test: /\.js$/,
loader: 'babel-loader'
}]
},
plugins: [
new UglifyJsPlugin()
]
};