mirror of https://github.com/webpack/webpack.git
23 lines
476 B
JavaScript
23 lines
476 B
JavaScript
|
var path = require("path");
|
||
|
var webpack = require("../../");
|
||
|
module.exports = {
|
||
|
entry: {
|
||
|
main: "./example",
|
||
|
common: ["./vendor"] // optional
|
||
|
},
|
||
|
output: {
|
||
|
path: path.join(__dirname, "js"),
|
||
|
filename: "[name].chunkhash.js",
|
||
|
chunkFilename: "[chunkhash].js"
|
||
|
},
|
||
|
plugins: [
|
||
|
new webpack.optimize.CommonsChunkPlugin({
|
||
|
names: ["common", "manifest"]
|
||
|
})
|
||
|
/* without the "common" chunk:
|
||
|
new webpack.optimize.CommonsChunkPlugin({
|
||
|
name: "manifest"
|
||
|
})
|
||
|
*/
|
||
|
]
|
||
|
};
|