Fix deploy webpack config

This commit is contained in:
afc163 2016-02-23 19:39:03 +08:00
parent b347e6c384
commit 4ed16b3d5c

View File

@ -3,11 +3,20 @@ var config = require('./webpack.config');
delete config.devtool; delete config.devtool;
config.entry.demo = [config.entry.demo[0]]; config.entry.demo = [config.entry.demo[0]];
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
config.plugins = [config.plugins[0], new webpack.optimize.UglifyJsPlugin({
sourceMap: false, sourceMap: false,
output: { output: {
ascii_only: true ascii_only: true
} }
})); })];
config.module.loaders.forEach(function(loader) {
if (loader.loader === 'babel') {
// remove preset hmre
loader.query.presets = loader.query.presets.slice(0, 3);
}
return loader;
});
module.exports = config; module.exports = config;