Skip to content

Commit

Permalink
fix: wrong replace causing "on" files on S3 (#2392)
Browse files Browse the repository at this point in the history
Fix the regex to only replace `.js` at the end of the string
  • Loading branch information
JanStevens committed Mar 8, 2022
1 parent ec98072 commit f6b7efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/libs/lambda-at-edge/src/regeneration-handler.ts
Expand Up @@ -31,7 +31,7 @@ export const handler = async (event: AWSLambda.SQSEvent): Promise<void> => {

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

await s3StorePage({
html,
Expand Down

0 comments on commit f6b7efb

Please sign in to comment.