forked from henrist/cdk-cloudfront-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
49 lines (48 loc) · 1.2 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path")
module.exports = {
mode: "production",
target: "node",
node: {
__dirname: false,
},
entry: {
"check-auth/index": "./src/handlers/check-auth.ts",
"generate-secret/index": "./src/handlers/generate-secret.ts",
"http-headers/index": "./src/handlers/http-headers.ts",
"parse-auth/index": "./src/handlers/parse-auth.ts",
"refresh-auth/index": "./src/handlers/refresh-auth.ts",
"sign-out/index": "./src/handlers/sign-out.ts",
},
resolve: {
extensions: [".ts", ".js"],
},
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules/,
},
{
test: /\.html$/,
loader: "html-loader",
options: {
minimize: true,
},
},
],
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
libraryTarget: "commonjs",
},
performance: {
hints: "error",
// Max size of deployment bundle in Lambda@Edge Viewer Request
maxAssetSize: 1048576,
// Max size of deployment bundle in Lambda@Edge Viewer Request
maxEntrypointSize: 1048576,
},
}