Currently, I am utilizing Vite.js along with TypeScript. My TypeScript file is located in 'src/vmodel/VGraph'. Within the index.html file, I import the aforementioned file as follows:
<script type="module" src="/src/vmodel/VGraph.ts"></script>
Subsequently, I proceed with the following code snippet:
<script>
const graph = new VGraph()
</script>
Wherein, VGraph has been properly defined and exported within the preceding file.
However, upon execution, an error message emerges: https://i.sstatic.net/E53AE.png
ReferenceError: Can't find variable: VGraph
This perplexing issue prompts me to question the root cause behind it. Despite confirming that the file loads successfully: https://i.sstatic.net/Crse7.png