Skip to content

Commit

Permalink
Update the script registration of the react scripts with a cache version
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 23, 2022
1 parent 0bcb3e6 commit 1092e2d
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 1092e2d

@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/3766384274
📝 Reported issues:

Please sign in to comment.