const path = require("path"); const nodeExternals = require("webpack-node-externals"); /** * @type {import('webpack').Configuration} */ module.exports = { mode: "production", entry: "./src/app.ts", module: { rules: [ { test: /\.ts/, use: "ts-loader", exclude: /node_modules/ } ] }, target: "node", devtool: "source-map", optimization: { chunkIds: "named", minimize: false, mangleExports: false, moduleIds: "named" }, externalsPresets: { node: true }, externals: [ nodeExternals({ allowlist: ["common"] }) ], output: { filename: "app.js", path: path.resolve(__dirname, "production") }, resolve: { extensions: [".ts", ".js"], alias: { "@languages": path.resolve(__dirname, "../languages") } } };