webpack/examples/chunkhash/webpack.config.js

24 lines
477 B
JavaScript
Raw Normal View History

2015-11-21 04:36:43 +08:00
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"
})
*/
]
2017-01-11 17:51:58 +08:00
};