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'],
|
2017-07-09 13:41:53 +00:00
|
|
|
account: ['babel-polyfill', './src/account/root.js'],
|
2017-07-29 19:42:07 +00:00
|
|
|
reports: ['babel-polyfill', './src/reports/root.js'],
|
|
|
|
lists: ['babel-polyfill', './src/lists/root.js']
|
2017-05-28 16:49:00 +00:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
library: 'MailtrainReactBody',
|
|
|
|
filename: '[name].js',
|
|
|
|
path: path.resolve(__dirname, 'dist')
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
2017-08-16 14:10:30 +00:00
|
|
|
{
|
|
|
|
test: /\.(js|jsx)$/,
|
2017-08-16 19:41:36 +00:00
|
|
|
exclude: /(disposables|react-dnd-touch-backend)/ /* https://github.com/react-dnd/react-dnd/issues/407 */,
|
2017-08-16 14:10:30 +00:00
|
|
|
use: [ 'babel-loader' ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [ 'style-loader', 'css-loader' ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif)$/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'url-loader',
|
|
|
|
options: {
|
|
|
|
limit: 8192 // inline base64 URLs for <=8k images, direct URLs for the rest
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
exclude: path.join(__dirname, 'node_modules'),
|
|
|
|
use: [
|
|
|
|
'style-loader',
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
modules: true,
|
|
|
|
localIdentName: '[path][name]__[local]--[hash:base64:5]'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'sass-loader' ]
|
|
|
|
},
|
2017-05-28 16:49:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
externals: {
|
2017-06-04 11:16:29 +00:00
|
|
|
jquery: 'jQuery',
|
2017-07-08 13:48:34 +00:00
|
|
|
csfrToken: 'csfrToken',
|
|
|
|
mailtrainConfig: 'mailtrainConfig'
|
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
|
|
|
};
|