fix: handle relative path index resolution

This commit is contained in:
Julien Oculi 2024-06-04 18:03:03 +02:00
parent 8fff67d358
commit ed408be3fc

View file

@ -87,7 +87,7 @@ export function getIndexUrl(baseUrl: URL): URL {
* ```
*/
export function getSourceUrl(filePath: string, baseUrl: URL): URL {
if (filePath === '/') {
if (filePath === '/' || filePath === './') {
return getIndexUrl(baseUrl)
}