radiomanifest.js/webpack.config.js

26 lines
643 B
JavaScript
Raw Permalink Normal View History

2023-09-14 01:07:07 +02:00
const path = require("path");
2021-11-19 17:44:59 +01:00
2021-11-19 18:22:21 +01:00
const variants = [
2023-09-14 01:07:07 +02:00
{ 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;
});