Closed
Description
Hey All,
I'd like to explore support for importing json
, similar to how Node.js
currently support require('./some.json')
Expected behavior:
imported json would export an object or array with the content from the provided json file.
Why:
Currently the was to get JSON is via fetch + import.meta.url
... and requires a bit of back and forth... the eventual result is a promise to resolve to the json object. Being able to statically import and parse json would allow us to import specific symbols, export symbols, and asynchronously get resources during the fetch phase.
What are the next steps?:
I'm assuming a spec change in the HTML spec, but unsure what else we would need to do. Thoughts?