Skip to content

Commit

Permalink
Address code review and avoid writing map files
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Aug 16, 2024
1 parent 3025382 commit a51dfd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ function gutenberg_register_packages_scripts( $scripts ) {
$version = isset( $asset['version'] ) ? $asset['version'] : $default_version;

// Register the runtime dependency for each entry point.
array_push( $dependencies, 'wp-runtime' );
$dependencies[] = 'wp-runtime';

// Register HMR dependencies for each entry point in development mode.
if ( gutenberg_is_hmr_enabled() ) {
array_push( $dependencies, '🔥hot' );
$dependencies[] = '🔥hot';
}

// Add dependencies that cannot be detected and generated by build tools.
Expand Down
2 changes: 1 addition & 1 deletion tools/webpack/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ if ( baseConfig.mode === 'development' ) {
liveReload: false,
devMiddleware: {
writeToDisk( filePath ) {
return ! /\.hot-update\.js(on)?$/.test( filePath );
return ! /\.hot-update\.js(on)?(\.map)?$/.test( filePath );
},
},
headers: {
Expand Down

0 comments on commit a51dfd4

Please sign in to comment.