In a generic sense (aka, not within any particular tool or framework, not the behavior of the tool or framework that you work in)...
If you had an HTML file that looked like this:
<!doctype html>
<script type="module">
export default "jsvalue"
</script>
And a JS file that imported the default export of the HTML file like this:
import value from "./file.html"
console.log(value)
What would you want value
to be?
"jsvalue"
"<!doctype html>\n<script>..."
"//public/url/path/to/file.html"
undefined