21 lines
518 B
JavaScript
21 lines
518 B
JavaScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export default {
|
|
mode: "development",
|
|
entry: {
|
|
index: "./src/index.js",
|
|
print: "./src/print.js",
|
|
},
|
|
plugins: [new HtmlWebpackPlugin({ title: "Output Management" })],
|
|
output: {
|
|
filename: "[name].bundle.js",
|
|
path: path.resolve(__dirname, "dist"),
|
|
clean: true,
|
|
},
|
|
};
|