Skip to content

Instantly share code, notes, and snippets.

@jamiebuilds
Created July 30, 2019 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiebuilds/5f2a3629746aacc6e2e1c88d05d89d09 to your computer and use it in GitHub Desktop.
Save jamiebuilds/5f2a3629746aacc6e2e1c88d05d89d09 to your computer and use it in GitHub Desktop.

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