Files
learning-webpack/webpack-demo/webpack.config.js
2026-02-07 12:37:27 -06:00

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,
},
};