Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -118675,6 +118675,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
"/d-1.mjs": "sha384-MBO5IDfYaE6c6Aao94oZrIOiC6CGiSN2n4QUbHNPhzk5Xhm0djZLQqTpL0HzTUxk"
}
}</code></pre>

<p>The above example provides integrity metadata to be enforced on the modules <code
data-x="">/a-1.mjs</code> and <code data-x="">/d-1.mjs</code>, even if the latter is not defined
as an import in the map.</p>
Expand Down Expand Up @@ -119132,12 +119133,14 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
match are not conflicting, and all make it to the merged map.</p>

<p>So, the following existing and new import maps:</p>

<pre><code class="json" data-x="">{
"imports": {
"/app/": "./original-app/",
}
}</code>
<code class="json" data-x="">{
}</code></pre>

<pre><code class="json" data-x="">{
"imports": {
"/app/helper": "./helper/index.mjs"
},
Expand All @@ -119147,7 +119150,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
}
}
}</code></pre>

<p>Would be equivalent to the following single import map:</p>

<pre><code class="json" data-x="">{
"imports": {
"/app/": "./original-app/",
Expand All @@ -119167,13 +119172,16 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp

<p>So, if the <span>resolved module set</span> already contains the "<code
data-x="">/app/helper</code>", the following new import map:</p>

<pre><code class="json" data-x="">{
"imports": {
"/app/helper": "./helper/index.mjs",
"lodash": "/node_modules/lodash-es/lodash.js"
}
}</code></pre>

<p>Would be equivalent to the following one:</p>

<pre><code class="json" data-x="">{
"imports": {
"lodash": "/node_modules/lodash-es/lodash.js"
Expand All @@ -119185,6 +119193,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
<p>The same is true for rules that impact already resolved modules defined in specific scopes.
If we already resolved "<code data-x="">/app/helper</code>" from "<code
data-x="">/app/main.mjs</code>" the following new import map:</p>

<pre><code class="json" data-x="">{
"scopes": {
"/app/": {
Expand All @@ -119195,7 +119204,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
"lodash": "/node_modules/lodash-es/lodash.js"
}
}</code></pre>

<p>Would similarly be equivalent to:</p>

<pre><code class="json" data-x="">{
"imports": {
"lodash": "/node_modules/lodash-es/lodash.js"
Expand All @@ -119209,6 +119220,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
would not be added to the map.</p>
<p>For example, if we already resolved "<code data-x="">/app/helper</code>" from "<code
data-x="">/app/vendor/main.mjs</code>", the following new import map:</p>

<pre><code class="json" data-x="">{
"scopes": {
"/app/": {
Expand All @@ -119227,7 +119239,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
"/app/helper": "./other_path/helper/index.mjs"
}
}</code></pre>

<p>Would be equivalent to:</p>

<pre><code class="json" data-x="">{
"scopes": {
"/vendor/": {
Expand All @@ -119249,18 +119263,22 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
already resolved modules, the existing import map rules persist.</p>

<p>For example, the following existing and new import maps:</p>

<pre><code class="json" data-x="">{
"imports": {
"/app/helper": "./helper/index.mjs",
"lodash": "/node_modules/lodash-es/lodash.js"
}
}</code>
<code class="json" data-x="">{
}</code></pre>

<pre><code class="json" data-x="">{
"imports": {
"/app/helper": "./main/helper/index.mjs"
}
}</code></pre>

<p>Would be equivalent to the following single import map:</p>

<pre><code class="json" data-x="">{
"imports": {
"/app/helper": "./helper/index.mjs",
Expand Down