Skip to content

Commit

Permalink
Scripts: Try adding React Fast Refresh support
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Aug 10, 2021
1 parent a510403 commit 59b9e5f
Show file tree
Hide file tree
Showing 7 changed files with 1,492 additions and 394 deletions.
18 changes: 0 additions & 18 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,24 +503,6 @@ function gutenberg_register_packages_styles( $styles ) {
}
add_action( 'wp_default_styles', 'gutenberg_register_packages_styles' );

/**
* Registers common scripts and styles to be used as dependencies of the editor
* and plugins.
*
* @since 0.1.0
*/
function gutenberg_enqueue_block_editor_assets() {
if ( defined( 'GUTENBERG_LIVE_RELOAD' ) && GUTENBERG_LIVE_RELOAD ) {
$live_reload_url = ( GUTENBERG_LIVE_RELOAD === true ) ? 'http://localhost:35729/livereload.js' : GUTENBERG_LIVE_RELOAD;

wp_enqueue_script(
'gutenberg-live-reload',
$live_reload_url
);
}
}
add_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets' );

/**
* Retrieves a unique and reasonably short and human-friendly filename for a
* vendor script based on a URL and the script handle.
Expand Down
Loading

0 comments on commit 59b9e5f

Please sign in to comment.