diff --git a/packages/libs/lambda-at-edge/src/regeneration-handler.ts b/packages/libs/lambda-at-edge/src/regeneration-handler.ts index 933bdcfc4b..6d2b82ddac 100644 --- a/packages/libs/lambda-at-edge/src/regeneration-handler.ts +++ b/packages/libs/lambda-at-edge/src/regeneration-handler.ts @@ -31,7 +31,7 @@ export const handler = async (event: AWSLambda.SQSEvent): Promise => { const normalizedUri = decodeURI(regenerationEvent.pageS3Path) .replace(`static-pages/${manifest.buildId}`, "") - .replace(".js", ""); + .replace(/.js$/, ""); await s3StorePage({ html,