Skip to content

Commit

Permalink
Update the script registration of the react scripts with a cache vers…
Browse files Browse the repository at this point in the history
…ion (#46768)
  • Loading branch information
youknowriad authored Dec 23, 2022
1 parent 783ae6a commit b95339b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,15 @@ function gutenberg_register_vendor_scripts( $scripts ) {
'react',
gutenberg_url( 'build/vendors/react' . $extension ),
// See https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#externalising-react.
SCRIPT_DEBUG ? array( 'wp-react-refresh-entry', 'wp-polyfill' ) : array( 'wp-polyfill' )
SCRIPT_DEBUG ? array( 'wp-react-refresh-entry', 'wp-polyfill' ) : array( 'wp-polyfill' ),
'18'
);
gutenberg_override_script(
$scripts,
'react-dom',
gutenberg_url( 'build/vendors/react-dom' . $extension ),
array( 'react' )
array( 'react' ),
'18'
);
}
add_action( 'wp_default_scripts', 'gutenberg_register_vendor_scripts' );
Expand Down

1 comment on commit b95339b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3766660413
📝 Reported issues:

Please sign in to comment.