Skip to content

Commit

Permalink
Use regular wp function
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Sep 6, 2024
1 parent 7f6ac84 commit db6307b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,11 @@ function gutenberg_register_packages_scripts( $scripts ) {
}

// Register the runtime script.
gutenberg_override_script(
$scripts,
'wp-runtime',
gutenberg_url( 'build/runtime.min.js' ),
array()
);
$scripts->add( 'wp-runtime', gutenberg_url( 'build/runtime.min.js' ) );

// Register development dependencies for Hot Module Replacement.
if ( gutenberg_is_hmr_enabled() ) {
gutenberg_override_script(
$scripts,
'🔥hot',
gutenberg_url( 'build/🔥hot.js' ),
array( 'wp-runtime' )
);
$scripts->add( '🔥hot', gutenberg_url( 'build/🔥hot.js' ), array( 'wp-runtime' ) );
}

foreach ( glob( gutenberg_dir_path() . 'build/*/index.min.js' ) as $path ) {
Expand Down

0 comments on commit db6307b

Please sign in to comment.