-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
__dirname is broken when page URL starts with file:///
#1711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Try loading that URL and let me know if that works ok? |
file://
file:///
@guybedford Ah yes, it actually was |
I'm not sure I follow how that could be possible. The code at https://github.com/systemjs/systemjs/blob/master/src/format-helpers.js#L166 is designed to strip the |
It seems the wrong |
Thanks for spotting that and the PR. Rather than changing the |
I think the detection itself is robust, the problem is the current |
@saschanaz I understand, but I don't want to be doing OS environment detection in the browser at all in SystemJS. |
(Hence, why I'm suggesting a more flexible approach with the regex) |
SystemJS in local environment fails to get correct __dirname. It becomes
/C:/...
when it should befile:///C:/...
(absolute) or just/
(relative).On MSEdge:
The text was updated successfully, but these errors were encountered: