Svelte components have file location meta data
Svelte nodes have a
__svelte_meta object in development mode that contains the file location of the component that rendered that node.
You an try it out on StackBlitz. Inspect an element using the Chrome Dev Tools and use the console:
$0 references the last selected DOM element. It is part of the DevTool's Console API)
Learn more about