diff --git a/src/NextjsBucketDeployment.ts b/src/NextjsBucketDeployment.ts index e2569f36..211a6baa 100644 --- a/src/NextjsBucketDeployment.ts +++ b/src/NextjsBucketDeployment.ts @@ -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; /** @@ -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, };