<p dir="auto">The compiler API does compile the source code and emits a sourcemap, but the filenames in the emit map are not correct.</p>
<p dir="auto">This example shows a basic discrepancy:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const [diag, emit] = await Deno.compile(&quot;https://deno.land/std@0.64.0/examples/welcome.ts&quot;);
console.log(Object.keys(emit));
/*
[
  &quot;https://deno.land/std@0.64.0/examples/welcome.js.map&quot;,
  &quot;https://deno.land/std@0.64.0/examples/welcome.js&quot;
]
*/
const [diagHash, emitHash] = await Deno.compile(
  &quot;https://deno.land/std@0.64.0/examples/welcome.ts#1&quot;
);
console.log(Object.keys(emitHash));
/*
[
  &quot;https://deno.land/std@0.64.0/examples/welcome.ts#1.js.map&quot;,
  &quot;https://deno.land/std@0.64.0/examples/welcome.ts#1.js&quot;
]
*/"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">diag</span><span class="pl-kos">,</span> <span class="pl-s1">emit</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">compile</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/std@0.64.0/examples/welcome.ts"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">keys</span><span class="pl-kos">(</span><span class="pl-s1">emit</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/*</span>
<span class="pl-c">[</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/examples/welcome.js.map",</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/examples/welcome.js"</span>
<span class="pl-c">]</span>
<span class="pl-c">*/</span>
<span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">diagHash</span><span class="pl-kos">,</span> <span class="pl-s1">emitHash</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">compile</span><span class="pl-kos">(</span>
  <span class="pl-s">"https://deno.land/std@0.64.0/examples/welcome.ts#1"</span>
<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">keys</span><span class="pl-kos">(</span><span class="pl-s1">emitHash</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/*</span>
<span class="pl-c">[</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/examples/welcome.ts#1.js.map",</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/examples/welcome.ts#1.js"</span>
<span class="pl-c">]</span>
<span class="pl-c">*/</span></pre></div>
<p dir="auto">Using something with a circular dependency like <code class="notranslate">https://deno.land/std@0.64.0/http/server.ts</code> obviously renders both because the hash or search is only in the root module:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const [diag, emit] = await Deno.compile(&quot;https://deno.land/std@0.64.0/http/server.ts?abc=def&quot;);
console.log(Object.keys(emit));
/*
[
  ...
  &quot;https://deno.land/std@0.64.0/http/server.js.map&quot;,
  &quot;https://deno.land/std@0.64.0/http/server.js&quot;,
  ...
  &quot;https://deno.land/std@0.64.0/http/server.ts?abc=def.js.map&quot;,
  &quot;https://deno.land/std@0.64.0/http/server.ts?abc=def.js&quot;
]
*/"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">diag</span><span class="pl-kos">,</span> <span class="pl-s1">emit</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">compile</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/std@0.64.0/http/server.ts?abc=def"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">keys</span><span class="pl-kos">(</span><span class="pl-s1">emit</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">/*</span>
<span class="pl-c">[</span>
<span class="pl-c">  ...</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/http/server.js.map",</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/http/server.js",</span>
<span class="pl-c">  ...</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/http/server.ts?abc=def.js.map",</span>
<span class="pl-c">  "https://deno.land/std@0.64.0/http/server.ts?abc=def.js"</span>
<span class="pl-c">]</span>
<span class="pl-c">*/</span></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/69170106/236354909-b46917ed-298a-4792-90b1-8faa254a8ed3.png"><img src="https://user-images.githubusercontent.com/69170106/236354909-b46917ed-298a-4792-90b1-8faa254a8ed3.png" alt="Screenshot (141)" style="max-width: 100%;"></a></p>
<h3 dir="auto">Chrome devtools</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/69170106/236355267-3f89d7e8-0bdb-4f9b-bb19-76c94868b628.png"><img src="https://user-images.githubusercontent.com/69170106/236355267-3f89d7e8-0bdb-4f9b-bb19-76c94868b628.png" alt="Screenshot (142)" style="max-width: 100%;"></a></p>
<h3 dir="auto">Reproduction</h3>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const response = await fetch('https://deno.land/x/dax@0.31.1/src/lib/rs_lib_bg.wasm')
const instance = WebAssembly.instantiateStreaming(response)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">fetch</span><span class="pl-kos">(</span><span class="pl-s">'https://deno.land/x/dax@0.31.1/src/lib/rs_lib_bg.wasm'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-smi">WebAssembly</span><span class="pl-kos">.</span><span class="pl-en">instantiateStreaming</span><span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">)</span></pre></div>