45 lines
923 B
Java
45 lines
923 B
Java
![]() |
const webpack = require('webpack');
|
||
|
const resolve = require('path').resolve;
|
||
|
|
||
|
module.exports = {
|
||
|
entry: {
|
||
|
'g2-brush': './index.js'
|
||
|
},
|
||
|
output: {
|
||
|
filename: '[name].js',
|
||
|
library: 'Brush',
|
||
|
libraryTarget: 'umd',
|
||
|
path: resolve(__dirname, 'build/')
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.js$/,
|
||
|
// exclude: /(node_modules|bower_components)/,
|
||
|
use: {
|
||
|
loader: 'babel-loader',
|
||
|
options: {
|
||
|
babelrc: false,
|
||
|
plugins: [
|
||
|
'transform-remove-strict-mode'
|
||
|
],
|
||
|
presets: [
|
||
|
[
|
||
|
'es2015', {
|
||
|
loose: true
|
||
|
// modules: false
|
||
|
}
|
||
|
],
|
||
|
'stage-0'
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
plugins: [
|
||
|
new webpack.NoEmitOnErrorsPlugin(),
|
||
|
new webpack.optimize.AggressiveMergingPlugin()
|
||
|
]
|
||
|
};
|