Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Question:

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?

  1. "jsvalue"
  2. "<!doctype html>\n<script>..."
  3. "//public/url/path/to/file.html"
  4. undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.