2017-05-28 16:49:00 +00:00
|
|
|
const webpack = require('webpack');
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2017-06-21 00:14:14 +00:00
|
|
|
namespaces: ['babel-polyfill', './src/namespaces/root.js'],
|
2017-06-30 14:11:02 +00:00
|
|
|
users: ['babel-polyfill', './src/users/root.js'],
|
|
|
|
account: ['babel-polyfill', './src/account/root.js']
|
2017-05-28 16:49:00 +00:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
library: 'MailtrainReactBody',
|
|
|
|
filename: '[name].js',
|
|
|
|
path: path.resolve(__dirname, 'dist')
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{test: /\.(js|jsx)$/, use: 'babel-loader'},
|
|
|
|
{test: /\.css$/, loader: 'style-loader!css-loader'},
|
|
|
|
{test: /\.(png|jpg|gif)$/, loader: 'url-loader?limit=8192' } // inline base64 URLs for <=8k images, direct URLs for the rest
|
|
|
|
]
|
|
|
|
},
|
|
|
|
externals: {
|
2017-06-04 11:16:29 +00:00
|
|
|
jquery: 'jQuery',
|
|
|
|
csfrToken: 'csfrToken'
|
2017-05-28 16:49:00 +00:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
// new webpack.optimize.UglifyJsPlugin(),
|
|
|
|
new webpack.optimize.CommonsChunkPlugin('common')
|
2017-06-21 00:14:14 +00:00
|
|
|
],
|
|
|
|
watchOptions: {
|
|
|
|
ignored: 'node_modules/',
|
|
|
|
poll: 1000
|
|
|
|
}
|
2017-05-28 16:49:00 +00:00
|
|
|
};
|