Added own configuration objects for different webpack environments.

This commit is contained in:
Chris
2015-09-17 08:02:36 +02:00
parent 22be5fe0f4
commit f871f2aef7
10 changed files with 207 additions and 155 deletions
+26
View File
@@ -0,0 +1,26 @@
var path = require('path');
var webpack = require('webpack');
var _ = require('lodash');
var baseConfig = require('./base');
var config = _.merge({
entry: path.join(__dirname, '../src/components/run'),
cache: false,
devtool: 'sourcemap',
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.NoErrorsPlugin()
]
}, baseConfig);
config.module.loaders.push({
test: /\.(js|jsx)$/,
loader: 'babel',
include: path.join(__dirname, '/../src')
});
module.exports = config;