Commit d393a2d
committed
[TASK] Prepare import map prefix-based URL calculation
Import map resolution without a cache-bust suffix missed to join a
previously splitted path-string via slashes, when a prefix based
import-declaration was used to calculate the resulting URL of a
JavaScript bare module specifier (usecase: calculate the
URL of a bare module specifier for usage in a `<script src="">`
tag, where bare module specifiers like `@typo3/backend/foo.js` can
not be used directly as browsers will not map them by importmap).
Note: TYPO3 currently uses cache-bust suffixes only, as there
are no cache-bust prefixes yet. Therefore all prefix-paths are
recursively pre-calculated in `computeImportMaps()`, which effecively
skipped the broken codepath for the current environments, which means
this is a preparatory TASK and not a BUGFIX for the case when
once prefix-based cache-busting is added in #98481.
Resolves: #103954
Related: #98481
Releases: main, 13.4
Change-Id: Ia6046a5b9a18016cd8166bd8ec30738663c73a46
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84447
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: Andreas Kienast <akienast@scripting-base.de>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Andreas Kienast <akienast@scripting-base.de>
Reviewed-by: Benjamin Franzke <ben@bnf.dev>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benjamin Franzke <ben@bnf.dev>1 parent e82ec8a commit d393a2d
File tree
3 files changed
+22
-1
lines changed- typo3/sysext/core
- Classes/Page
- Tests/Unit/Page
- Fixtures/ImportMap/core/Resources/Public/JavaScript/nested
3 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
104 | 125 | | |
105 | 126 | | |
106 | 127 | | |
| |||
0 commit comments