Files
翠GitHubgraphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
4dc413a50d test: update import-assertion playground to import-attribute (#22783)
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2026-06-30 11:02:55 +09:00

20 lines
415 B
HTML

<h1>Import assertion</h1>
<h2>From source code</h2>
<p class="src"></p>
<h2>From dependency</h2>
<p class="dep"></p>
<script type="module">
import * as data from './data.json' with { type: 'json' }
text('.src', data.foo)
import * as depData from '@vitejs/test-import-attribute-dep'
text('.dep', depData.hello)
function text(el, text) {
document.querySelector(el).textContent = text
}
</script>