Skip to content

Commit 5686512

Browse files
xDeSwanicolas-grekas
authored andcommitted
Prevent duplicate entries in module preloads
1 parent 0b6d0e1 commit 5686512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/AssetMapper/ImportMap/ImportMapRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function render(string|array $entryPoint, array $attributes = []): string
7373
if ('css' !== $data['type']) {
7474
$importMap[$importName] = $path;
7575
if ($preload) {
76-
$modulePreloads[] = $path;
76+
$modulePreloads[$path] = $path;
7777
}
7878
} elseif ($preload) {
7979
$cssLinks[] = $path;

0 commit comments

Comments
 (0)