-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Error loading module with assets on Windows #751
Comments
Thanks for sharing. Does the change: if (typeof window != 'undefined' && typeof document != 'undefined' && window.location)
var windowOrigin = location.protocol + '//' + (location.protocol == 'file' && location.hostname[0] != '/' ? '/' : '') + location.hostname + (location.port ? ':' + location.port : ''); also work for you here? |
That nearly fixes it. The protocol includes a colon, so adding that to the check for a file protocol fixes the issue I noticed:
This problem doesn't happen on Mac, or at least doesn't in my environment. |
Excellent, thanks I've included the fix. |
The fix wasn't quite right - I've corrected it in 91b7bc0. Do let me know if you still have any problems here. |
NB this should be ported for 0.18 before the 0.19 release. |
Released in 0.19.0. |
Loading a module with assets on Windows fails. This is caused by line 2633:
In this case,
location.protocol = 'file:'
which causes problems at line 2687:Which causes
address = '/c:/path/to/module'
. This eventually causes the module to treat__dirname = 'c:\c:\path\to\module'
and loading assets fails.The following change fixes this issue at line 2633:
The text was updated successfully, but these errors were encountered: