diff --git a/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php b/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php index c4440482f4b68..370e57e9d3c83 100644 --- a/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php +++ b/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php @@ -129,8 +129,9 @@ public function resolvePackages(array $packagesToRequire): array $entrypoints = $cssEntrypointResponse->toArray()['entrypoints'] ?? []; $cssFile = $entrypoints['css']['file'] ?? null; + $guessed = $entrypoints['css']['guessed'] ?? true; - if (!$cssFile) { + if (!$cssFile || $guessed) { continue; } diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php index 733ecfedcdb16..37f0cdff641e8 100644 --- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php +++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php @@ -224,7 +224,7 @@ public static function provideResolvePackagesTests(): iterable [ 'url' => '/v1/packages/npm/bootstrap@5.2.0/entrypoints', 'response' => ['body' => ['entrypoints' => [ - 'css' => ['file' => '/dist/css/bootstrap.min.css'], + 'css' => ['file' => '/dist/css/bootstrap.min.css', 'guessed' => false], ]]], ], [
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: