Loaders in the browser
Demo: Loader with ESModule example
In a frontend group, there was a discussion about how to use a template (like a Vue template or efml template) without a bundler directly.
1 | import markdown from "./markdown.md"; |
Unfortunately, there is no proposal such as a custom import handler.
(The import-map can’t load other types than JS)
TLDR: import.meta.url
is the core part.