@@ -118675,6 +118675,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
118675
118675
"/d-1.mjs": "sha384-MBO5IDfYaE6c6Aao94oZrIOiC6CGiSN2n4QUbHNPhzk5Xhm0djZLQqTpL0HzTUxk"
118676
118676
}
118677
118677
}</code></pre>
118678
+
118678
118679
<p>The above example provides integrity metadata to be enforced on the modules <code
118679
118680
data-x="">/a-1.mjs</code> and <code data-x="">/d-1.mjs</code>, even if the latter is not defined
118680
118681
as an import in the map.</p>
@@ -119132,12 +119133,14 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119132
119133
match are not conflicting, and all make it to the merged map.</p>
119133
119134
119134
119135
<p>So, the following existing and new import maps:</p>
119136
+
119135
119137
<pre><code class="json" data-x="">{
119136
119138
"imports": {
119137
119139
"/app/": "./original-app/",
119138
119140
}
119139
- }</code>
119140
- <code class="json" data-x="">{
119141
+ }</code></pre>
119142
+
119143
+ <pre><code class="json" data-x="">{
119141
119144
"imports": {
119142
119145
"/app/helper": "./helper/index.mjs"
119143
119146
},
@@ -119147,7 +119150,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119147
119150
}
119148
119151
}
119149
119152
}</code></pre>
119153
+
119150
119154
<p>Would be equivalent to the following single import map:</p>
119155
+
119151
119156
<pre><code class="json" data-x="">{
119152
119157
"imports": {
119153
119158
"/app/": "./original-app/",
@@ -119167,13 +119172,16 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119167
119172
119168
119173
<p>So, if the <span>resolved module set</span> already contains the "<code
119169
119174
data-x="">/app/helper</code>", the following new import map:</p>
119175
+
119170
119176
<pre><code class="json" data-x="">{
119171
119177
"imports": {
119172
119178
"/app/helper": "./helper/index.mjs",
119173
119179
"lodash": "/node_modules/lodash-es/lodash.js"
119174
119180
}
119175
119181
}</code></pre>
119182
+
119176
119183
<p>Would be equivalent to the following one:</p>
119184
+
119177
119185
<pre><code class="json" data-x="">{
119178
119186
"imports": {
119179
119187
"lodash": "/node_modules/lodash-es/lodash.js"
@@ -119185,6 +119193,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119185
119193
<p>The same is true for rules that impact already resolved modules defined in specific scopes.
119186
119194
If we already resolved "<code data-x="">/app/helper</code>" from "<code
119187
119195
data-x="">/app/main.mjs</code>" the following new import map:</p>
119196
+
119188
119197
<pre><code class="json" data-x="">{
119189
119198
"scopes": {
119190
119199
"/app/": {
@@ -119195,7 +119204,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119195
119204
"lodash": "/node_modules/lodash-es/lodash.js"
119196
119205
}
119197
119206
}</code></pre>
119207
+
119198
119208
<p>Would similarly be equivalent to:</p>
119209
+
119199
119210
<pre><code class="json" data-x="">{
119200
119211
"imports": {
119201
119212
"lodash": "/node_modules/lodash-es/lodash.js"
@@ -119209,6 +119220,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119209
119220
would not be added to the map.</p>
119210
119221
<p>For example, if we already resolved "<code data-x="">/app/helper</code>" from "<code
119211
119222
data-x="">/app/vendor/main.mjs</code>", the following new import map:</p>
119223
+
119212
119224
<pre><code class="json" data-x="">{
119213
119225
"scopes": {
119214
119226
"/app/": {
@@ -119227,7 +119239,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119227
119239
"/app/helper": "./other_path/helper/index.mjs"
119228
119240
}
119229
119241
}</code></pre>
119242
+
119230
119243
<p>Would be equivalent to:</p>
119244
+
119231
119245
<pre><code class="json" data-x="">{
119232
119246
"scopes": {
119233
119247
"/vendor/": {
@@ -119249,18 +119263,22 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119249
119263
already resolved modules, the existing import map rules persist.</p>
119250
119264
119251
119265
<p>For example, the following existing and new import maps:</p>
119266
+
119252
119267
<pre><code class="json" data-x="">{
119253
119268
"imports": {
119254
119269
"/app/helper": "./helper/index.mjs",
119255
119270
"lodash": "/node_modules/lodash-es/lodash.js"
119256
119271
}
119257
- }</code>
119258
- <code class="json" data-x="">{
119272
+ }</code></pre>
119273
+
119274
+ <pre><code class="json" data-x="">{
119259
119275
"imports": {
119260
119276
"/app/helper": "./main/helper/index.mjs"
119261
119277
}
119262
119278
}</code></pre>
119279
+
119263
119280
<p>Would be equivalent to the following single import map:</p>
119281
+
119264
119282
<pre><code class="json" data-x="">{
119265
119283
"imports": {
119266
119284
"/app/helper": "./helper/index.mjs",
0 commit comments