-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
25 lines (24 loc) · 809 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
25 lines (24 loc) · 809 Bytes
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
const path = require('path');
module.exports = {
entry: './src/services/retrieveNodeLambda.ts', // Entry point of your Lambda function
target: 'node', // Target node because it's a Lambda function
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
modules: [path.resolve(__dirname, 'node_modules'), 'node_modules'],
},
output: {
filename: 'retrieveNodeLambda.js', // Output file
path: path.resolve(__dirname, 'dist'), // Output directory
libraryTarget: 'commonjs2', // Important for AWS Lambda
},
mode: 'production', // Can be 'development' for debugging
};