mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
20 lines
385 B
HTML
20 lines
385 B
HTML
<h1>Build Old</h1>
|
|
|
|
<h2>import meta url</h2>
|
|
<p class="import-meta-url"></p>
|
|
|
|
<h2>dynamic import</h2>
|
|
<p class="dynamic-import"></p>
|
|
|
|
<script type="module">
|
|
text('.import-meta-url', typeof import.meta.url)
|
|
|
|
import('./dynamic.js').then((m) => {
|
|
text('.dynamic-import', m.default)
|
|
})
|
|
|
|
function text(el, text) {
|
|
document.querySelector(el).textContent = text
|
|
}
|
|
</script>
|