MCSManager/webpack.config.js

18 lines
541 B
JavaScript
Raw Permalink Normal View History

2022-08-05 16:10:27 +08:00
// Copyright (C) 2022 MCSManager <mcsmanager-dev@outlook.com>
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")
}
};