Skip to content

Commit

Permalink
chore: update webpack.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Apr 10, 2016
1 parent 76935c9 commit 347f862
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"main": "lib/index",
"files": [
"dist",
"!dist/common.js",
"lib",
"style"
],
Expand Down
10 changes: 5 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const webpack = require('atool-build/lib/webpack');

module.exports = function(webpackConfig) {
// remove common.js
webpackConfig.plugins = webpackConfig.plugins.filter((plugin) => {
return !(plugin instanceof webpack.optimize.CommonsChunkPlugin);
});

if (process.env.ANTD === 'WEBSITE') {
const component = process.env.COMPONENT_STYLE;

Expand Down Expand Up @@ -76,10 +81,5 @@ module.exports = function(webpackConfig) {
];
}

// remove common.js
if (webpackConfig.plugins[0].chunkNames === 'common') {
webpackConfig.plugins.shift();
}

return webpackConfig;
};

0 comments on commit 347f862

Please sign in to comment.