absolute paths to workers in windows not working when containing a drive letter
MartyHav opened this issue · comments
MartyHav commented
When we create a base url here:
Line 75 in 4a46d3a
It will be ignored later here, if the given url contains drive letter ( like "c:/foo/bar") :
Lines 100 to 102 in 4a46d3a
And fileURLToPath will throw an error ( "URL not a file scheme" ) as the drive letter is set as protocol and file scheme of baseUrl is ignored.
I think we are safe when we do it like this:
const urlObject = new URL.URL(url, baseUrl);
mod = urlObject.pathName;
Not sure if this is bypassing the reason why fileUrlToPath is used at all.
But did work for me on Windows and macOS.
Jordan commented
I've developed a fix for this and aim to have a PR up soon.