ant-design/webpack.deploy.config.js

23 lines
505 B
JavaScript
Raw Normal View History

2016-01-14 02:37:52 +08:00
var webpack = require('webpack');
2015-10-20 17:10:21 +08:00
var config = require('./webpack.config');
2016-01-14 02:37:52 +08:00
delete config.devtool;
2016-02-23 01:03:50 +08:00
config.entry.demo = [config.entry.demo[0]];
2016-02-23 19:39:03 +08:00
config.plugins = [config.plugins[0], new webpack.optimize.UglifyJsPlugin({
2016-01-14 02:37:52 +08:00
sourceMap: false,
output: {
ascii_only: true
}
2016-02-23 19:39:03 +08:00
})];
config.module.loaders.forEach(function(loader) {
if (loader.loader === 'babel') {
// remove preset hmre
loader.query.presets = loader.query.presets.slice(0, 3);
}
return loader;
});
2016-01-14 02:37:52 +08:00
2015-10-20 17:10:21 +08:00
module.exports = config;