2022-07-17 17:38:50 +08:00
|
|
|
/* eslint-disable no-undef */
|
2022-08-05 16:10:27 +08:00
|
|
|
const path = require("path");
|
|
|
|
const nodeExternals = require("webpack-node-externals");
|
2022-07-17 17:38:50 +08:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: "production",
|
2022-08-05 16:10:27 +08:00
|
|
|
entry: "./dist/app.js",
|
|
|
|
target: "node",
|
2022-07-17 17:38:50 +08:00
|
|
|
externalsPresets: { node: true }, // in order to ignore built-in modules like path, fs, etc.
|
|
|
|
externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
|
|
|
|
output: {
|
2022-08-05 16:10:27 +08:00
|
|
|
filename: "app.js",
|
|
|
|
path: path.resolve(__dirname, "production")
|
|
|
|
}
|
|
|
|
};
|