webpack/examples/dll-app-and-vendor/0-vendor/webpack.config.js

20 lines
454 B
JavaScript
Raw Normal View History

var path = require("path");
var webpack = require("../../../");
module.exports = {
// mode: "development || "production",
context: __dirname,
entry: ["example-vendor"],
output: {
filename: "vendor.js", // best use [hash] here too
path: path.resolve(__dirname, "dist"),
2018-02-25 09:00:20 +08:00
library: "vendor_lib_[hash]"
},
plugins: [
new webpack.DllPlugin({
name: "vendor_lib_[hash]",
2018-02-25 09:00:20 +08:00
path: path.resolve(__dirname, "dist/vendor-manifest.json")
})
]
};