Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Dec 3, 2024
1 parent a0fc8e9 commit cf97a83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/dependency-extraction-webpack-plugin/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ class DependencyExtractionWebpackPlugin {
}

if ( compilation.options?.optimization?.runtimeChunk !== false ) {
// Sets the script handle for the shared runtime file so WordPress registers it only once when using the asset file.
assetData.handle =
compilation.name +
'-' +
Expand Down
1 change: 1 addition & 0 deletions packages/scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ const scriptConfig = {
} );

if ( hasReactFastRefresh ) {
// Prepends the file reference to the shared runtime chunk to every script type defined for the block.
const runtimePath = relative(
dirname( absoluteFrom ),
fromProjectRoot(
Expand Down

0 comments on commit cf97a83

Please sign in to comment.