












webpack already does not need a config file:
npx webpack --mode=production --entry ./index.js --output-path dist/ --output-filename main.js
manual adding a config file, export can be single or array, webpack.config.js:
import path from "path"; export default [ { mode: "production", entry: "./index.js", output: { path: path.resolve("./dist/"), filename: "bundle.js", }, }, { mode: "production", entry: "./index1.js", output: { filename: "bundle1.js", }, }, ];
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。