Skip to content

Commit

Permalink
Change prune default to false to fix 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
bestickley authored Jul 13, 2024
1 parent 8e1e853 commit 377cd36
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/NextjsBucketDeployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export interface NextjsBucketDeploymentProps {
* Old objects are determined by listing objects
* in bucket before creating new objects and finding the objects that aren't in
* the new objects.
* @default true
*
* Note, if this is set to true then clients who have old HTML files (browser tabs opened before deployment)
* will reference JS, CSS files that do not exist in S3 reslting in 404s.
* @default false
*/
readonly prune?: boolean | undefined;
/**
Expand Down Expand Up @@ -143,7 +146,7 @@ export class NextjsBucketDeployment extends Construct {
destinationBucketName: this.props.destinationBucket.bucketName,
destinationKeyPrefix: this.props.destinationKeyPrefix,
putConfig: this.props.putConfig,
prune: this.props.prune,
prune: this.props.prune ?? true,
substitutionConfig: this.props.substitutionConfig,
zip: this.props.zip,
};
Expand Down

0 comments on commit 377cd36

Please sign in to comment.