Skip to content

Commit 9f26381

Browse files
committed
fix build
1 parent 559e1ab commit 9f26381

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cloudformation/main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,20 @@ Resources:
126126
Format: esm
127127
Minify: true
128128
OutExtension:
129-
- .js=.js
130-
Target: "node22"
129+
- .js=.mjs
130+
Target: "es2022"
131131
Sourcemap: false
132132
EntryPoints:
133133
- api/lambda.js
134134
External:
135135
- aws-sdk
136+
Banner:
137+
- js=import path from 'path';
138+
import { fileURLToPath } from 'url';
139+
import { createRequire as topLevelCreateRequire } from 'module';
140+
const require = topLevelCreateRequire(import.meta.url);
141+
const __filename = fileURLToPath(import.meta.url);
142+
const __dirname = path.dirname(__filename);
136143
Properties:
137144
Architectures: [arm64]
138145
CodeUri: ../dist

0 commit comments

Comments
 (0)