diff --git a/src/wp-includes/class-wp-script-modules.php b/src/wp-includes/class-wp-script-modules.php index 0a1408d003248..e41d1004350c9 100644 --- a/src/wp-includes/class-wp-script-modules.php +++ b/src/wp-includes/class-wp-script-modules.php @@ -305,7 +305,7 @@ public function print_import_map() { */ private function get_import_map(): array { $imports = array(); - $script_module_ids = $this->marked_for_inclusion + array_keys( $this->get_marked_for_enqueue() ); + $script_module_ids = array_merge( $this->marked_for_inclusion, array_keys( $this->get_marked_for_enqueue() ) ); foreach ( $this->get_dependencies( $script_module_ids ) as $id => $script_module ) { $src = $this->get_src( $id );