diff --git a/dependency-minification.php b/dependency-minification.php index 1938f7f..28a0990 100644 --- a/dependency-minification.php +++ b/dependency-minification.php @@ -728,6 +728,10 @@ static function group_handles_by_extra( array $handles, WP_Dependencies $wp_deps unset($extra['suffix']); unset($extra['rtl']); unset($extra['data']); + // Default scripts are not assigned 'group', so we use the original 'deps->args' value + if ( is_a( $wp_deps, 'WP_Scripts' ) && empty( $extra['group'] ) && is_int( $dep->args ) ) { + $extra['group'] = $dep->args; + } ksort($extra); $key = serialize($extra); $bundles[$key][] = $handle;