mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-21 03:12:10 +08:00
44 lines
827 B
JavaScript
Executable File
44 lines
827 B
JavaScript
Executable File
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")
|
|
}
|
|
}
|
|
};
|