webpack/examples/dll/webpack.config.js

27 lines
529 B
JavaScript
Raw Normal View History

"use strict";
2024-07-31 09:56:53 +08:00
const path = require("path");
const webpack = require("../../");
2015-05-17 00:27:59 +08:00
module.exports = {
2023-03-12 10:27:40 +08:00
// mode: "development" || "production",
resolve: {
2017-01-11 17:51:58 +08:00
extensions: [".js", ".jsx"]
},
2015-05-17 00:27:59 +08:00
entry: {
2015-10-13 22:19:11 +08:00
alpha: ["./alpha", "./a", "module"],
beta: ["./beta", "./b", "./c"]
2015-05-17 00:27:59 +08:00
},
output: {
path: path.join(__dirname, "dist"),
2015-05-17 00:27:59 +08:00
filename: "MyDll.[name].js",
2019-01-28 09:27:57 +08:00
library: "[name]_[fullhash]"
2015-05-17 00:27:59 +08:00
},
plugins: [
new webpack.DllPlugin({
path: path.join(__dirname, "dist", "[name]-manifest.json"),
2019-01-28 09:27:57 +08:00
name: "[name]_[fullhash]"
2015-05-17 00:27:59 +08:00
})
]
};