radiomanifest.js/webpack.config.js
2023-09-14 00:07:13 +01:00

25 lines
643 B
JavaScript

const path = require("path");
const variants = [
{ name: "web", libtype: "amd", target: "web" },
{ name: "node", libtype: "amd", target: "node" },
{ name: "oldstyle", libtype: "umd", target: "web" },
];
module.exports = variants.map((variant) => {
const obj = {
name: variant.name,
mode: "production",
entry: "./radiomanifest.js",
target: [variant.target],
output: {
path: path.resolve(__dirname, "dist"),
filename: "radiomanifest-" + variant.name + ".bundle.js",
clean: false,
library: {
name: "radiomanifest",
type: variant.libtype,
},
},
};
return obj;
});