Browser Requests Incorrect Path for JavaScript File After Build
I have the following file structure:
.
└── src/
└── index.html
└── main.ts
In my index.html, I try to use <script type="module" src="./main.ts"></script>.
When building it with your provided example script, main.ts and index.html get correctly converted, however now the browser tries to reach url/main.js which doesn't exist, instead of url/dist/main.js.
Trying to set a <base href="/dist/"> in index.html doesn't work, as now the HTMLParsers looks for ./src/dist/, which obviously doesn't exist. Neither does requesting <src="../src/main.ts". Maybe the tool could change occurrences of entry point to outdir/entrypoint?
I presume this is my own misunderstanding, but I'd be very grateful if you could take the time and run me through how to do this properly :)