Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit f6b7efb

Browse files
authored
fix: wrong replace causing "on" files on S3 (#2392)
Fix the regex to only replace `.js` at the end of the string
1 parent ec98072 commit f6b7efb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/libs/lambda-at-edge/src/regeneration-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const handler = async (event: AWSLambda.SQSEvent): Promise<void> => {
3131

3232
const normalizedUri = decodeURI(regenerationEvent.pageS3Path)
3333
.replace(`static-pages/${manifest.buildId}`, "")
34-
.replace(".js", "");
34+
.replace(/.js$/, "");
3535

3636
await s3StorePage({
3737
html,

0 commit comments

Comments
 (0)