mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
24 lines
599 B
HTML
24 lines
599 B
HTML
<div class="fetch-json-module">
|
|
json-module:
|
|
<pre></pre>
|
|
<code></code>
|
|
</div>
|
|
<div class="fetch-json-fs">
|
|
json-fs:
|
|
<pre></pre>
|
|
<code></code>
|
|
</div>
|
|
|
|
<script type="module">
|
|
const startModule = Date.now()
|
|
text('.fetch-json-module pre', await (await fetch('/json-module')).text())
|
|
text('.fetch-json-module code', Date.now() - startModule)
|
|
|
|
const startFs = Date.now()
|
|
text('.fetch-json-fs pre', await (await fetch('/json-fs')).text())
|
|
text('.fetch-json-fs code', Date.now() - startFs)
|
|
function text(sel, text) {
|
|
document.querySelector(sel).textContent = text
|
|
}
|
|
</script>
|