mirror of https://github.com/webpack/webpack.git
38 lines
709 B
JavaScript
38 lines
709 B
JavaScript
var path = require("path");
|
|
var webpack = require("../../");
|
|
module.exports = [
|
|
{
|
|
name: "vendor",
|
|
entry: ["./vendor", "./vendor2"],
|
|
output: {
|
|
path: path.resolve(__dirname, "js"),
|
|
filename: "vendor.js",
|
|
library: "vendor_[hash]"
|
|
},
|
|
plugins: [
|
|
new webpack.DllPlugin({
|
|
name: "vendor_[hash]",
|
|
path: path.resolve(__dirname, "js/manifest.json")
|
|
})
|
|
]
|
|
},
|
|
{
|
|
name: "app",
|
|
dependencies: ["vendor"],
|
|
entry: {
|
|
pageA: "./pageA",
|
|
pageB: "./pageB",
|
|
pageC: "./pageC"
|
|
},
|
|
output: {
|
|
path: path.join(__dirname, "js"),
|
|
filename: "[name].js"
|
|
},
|
|
plugins: [
|
|
new webpack.DllReferencePlugin({
|
|
manifest: path.resolve(__dirname, "js/manifest.json")
|
|
})
|
|
]
|
|
}
|
|
];
|