https://github.com/cazala/synaptic
Tip revision: c1dbc3fd7a48cda63ed56b7d3e4121f20446ef41 authored by Juan Cazala on 14 February 2019, 15:08:19 UTC
ci
ci
Tip revision: c1dbc3f
webpack.config.js
const webpack = require('webpack');
const license = require('./prebuild.js');
const path = require('path');
module.exports = {
context: __dirname,
entry: {
synaptic: path.resolve(__dirname, './src/synaptic.js'),
'synaptic.min': path.resolve(__dirname, './src/synaptic.js')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader'
}
}
]
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].js',
library: 'synaptic',
libraryTarget: 'umd'
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new webpack.BannerPlugin(license())
]
}