Commit ef97386
committed
bug symfony#61793 [AssetMapper] Prevent duplicate entries in module preloads (xDeSwa)
This PR was merged into the 6.4 branch.
Discussion
----------
[AssetMapper] Prevent duplicate entries in module preloads
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
When a library in `assets/controllers.json` is configured with `"eager` (ex. **live-component** when eager),
it may result in duplicate `modulepreload` entries being generated.
This change ensures that each preload path is only added once, even if the same import
appears multiple times. It also prevents accidental duplication in `importmap.php` if
a library is mistakenly listed more than once.
Commits
-------
5686512 Prevent duplicate entries in module preloadsFile tree
1 file changed
+1
-1
lines changed- src/Symfony/Component/AssetMapper/ImportMap
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments