Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 222e79f

Browse files
committed
Removed unnecessary Vite compiled JavaScript file hash generation functionality. File names are already suffixed with hashes for cache busting.
1 parent c0a2c16 commit 222e79f

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

includes/class-asset-enqueue.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,22 +249,19 @@ private function get_manifest_style( Manifest $manifest, string $entrypoint ) {
249249
*/
250250
public function register_vite_script( string $handle, string $path, array $dependencies = array(), $in_footer = true ) {
251251
foreach ( $this->manifests as $manifest ) {
252-
$entry_point = $manifest->getEntrypoint( $path );
252+
$entry_point = $manifest->getEntrypoint( $path, false );
253253
if ( empty( $entry_point ) ) {
254254
continue;
255255
}
256256
if ( empty( $entry_point['url'] ) ) {
257257
continue;
258258
}
259-
if ( empty( $entry_point['hash'] ) ) {
260-
continue;
261-
}
262259

263260
wp_register_script(
264261
$handle,
265262
$entry_point['url'],
266263
$dependencies,
267-
$entry_point['hash'],
264+
'void',
268265
$in_footer
269266
);
270267
break;

0 commit comments

Comments
 (0)