mirror of https://github.com/webpack/webpack.git
24 lines
557 B
JavaScript
24 lines
557 B
JavaScript
var path = require("path");
|
|
var CommonsChunkPlugin = require("../../lib/optimize/CommonsChunkPlugin");
|
|
module.exports = {
|
|
// mode: "development || "production",
|
|
entry: {
|
|
pageA: "./pageA",
|
|
pageB: "./pageB"
|
|
},
|
|
output: {
|
|
path: path.join(__dirname, "dist"),
|
|
filename: "[name].bundle.js",
|
|
chunkFilename: "[id].chunk.js"
|
|
},
|
|
plugins: [
|
|
new CommonsChunkPlugin({
|
|
filename: "commons.js",
|
|
name: "commons"
|
|
})
|
|
],
|
|
optimization: {
|
|
occurrenceOrder: true // To keep filename consistent between different modes (for example building only)
|
|
}
|
|
};
|