1
我試圖讓webpack用不同的插件集合收集兩個文件。 我想像是這樣的:針對不同入口點的各種插件
{
entry: {
name: "./first",
output: {
path: path.join(__dirname, "js"),
filename: "first.js"
},
plugins: [
new FirstPlugin()
],
},
entry: {
name: "./second",
path: path.join(__dirname, "js"),
filename: "second.js"
},
plugins: [
new AnotherPlugin()
]
}
}
但它肯定是行不通的。 是否有可能獲得當前entripoint進入插件運行時?然後,一切都將決定一個IF。