mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-08-13 12:30:30 +08:00
Added own configuration objects for different webpack environments.
This commit is contained in:
+26
@@ -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;
|
||||
Reference in New Issue
Block a user