diff --git a/packages/block-library/src/comments/index.php b/packages/block-library/src/comments/index.php index 48aac15af6fbb6..fbcff6217c0e33 100644 --- a/packages/block-library/src/comments/index.php +++ b/packages/block-library/src/comments/index.php @@ -76,6 +76,7 @@ function render_block_core_comments( $attributes, $content, $block ) { * why they are not defined in `block.json`. */ wp_enqueue_script( 'comment-reply' ); + wp_script_add_data( 'comment-reply', 'strategy', 'defer' ); enqueue_legacy_post_comments_block_styles( $block->name ); return sprintf( '
%2$s
', $wrapper_attributes, $output ); diff --git a/packages/block-library/src/post-comments-form/index.php b/packages/block-library/src/post-comments-form/index.php index 644b02ae0f1498..4f4f7b6ee87748 100644 --- a/packages/block-library/src/post-comments-form/index.php +++ b/packages/block-library/src/post-comments-form/index.php @@ -48,6 +48,7 @@ function render_block_core_post_comments_form( $attributes, $content, $block ) { // Enqueue the comment-reply script. wp_enqueue_script( 'comment-reply' ); + wp_script_add_data( 'comment-reply', 'strategy', 'defer' ); return $form; }