-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
32 lines (30 loc) · 898 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const path = require("path");
const webpack = require("webpack");
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
const nodeExternals = require("webpack-node-externals");
module.exports = {
entry: "./src/app.ts",
target: "node",
externals: [nodeExternals()],
optimization: {
minimize: false,
},
output: {
filename: "app.js",
path: path.resolve(__dirname, "build"),
},
devtool: "source-map",
resolve: {
extensions: [".ts", ".tsx", ".js"],
alias: {
"@controller": path.resolve(__dirname, "./src/controller/"),
"@repository": path.resolve(__dirname, "./src/repository/"),
"@entities": path.resolve(__dirname, "./dist/entities/"),
"@modules": path.resolve(__dirname, "./dist/modules/"),
},
plugins: [new TsconfigPathsPlugin()],
},
module: {
rules: [{ test: /\.tsx?$/, loader: "ts-loader" }],
},
};