Encountering an issue while trying to load a typescript file from HTML, resulting in this error
Here is the code snippet for the page:
export default function Home() {
return (
<>
<Script src="/static/main.tsx"></Script>
<div className="sidebar">Hi</div>
<div
className="canvasContainer"
>
<canvas id="mainCanvas"></canvas>
</div>
</>
);
}
The TypeScript file main.tsx
begins with export {}
to ensure it runs properly and avoids the "cannot be compiled under '--isolatedModules'..." error.