2015-01-12 06:15:11 +08:00
|
|
|
var CommonsChunkPlugin = require("../../lib/optimize/CommonsChunkPlugin");
|
2017-01-11 17:51:58 +08:00
|
|
|
|
2015-01-12 06:15:11 +08:00
|
|
|
module.exports = {
|
2017-12-14 17:09:09 +08:00
|
|
|
// mode: "development || "production",
|
2015-01-12 06:15:11 +08:00
|
|
|
plugins: [
|
|
|
|
new CommonsChunkPlugin({
|
|
|
|
name: "main",
|
|
|
|
async: "async1"
|
|
|
|
}),
|
|
|
|
new CommonsChunkPlugin({
|
|
|
|
name: "main",
|
|
|
|
async: "async2",
|
|
|
|
minChunks: 2
|
|
|
|
}),
|
|
|
|
new CommonsChunkPlugin({
|
|
|
|
async: true
|
|
|
|
}),
|
2017-12-14 17:09:09 +08:00
|
|
|
],
|
|
|
|
optimization: {
|
|
|
|
occurrenceOrder: true // To keep filename consistent between different modes (for example building only)
|
|
|
|
}
|
2017-01-11 17:51:58 +08:00
|
|
|
};
|