-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
App failed to load renderer page when path contains hash sign (#
) in Windows prod
#925
Comments
|
I've tested the pr with this build command which works in my local env. |
I mean, does issue with |
It is reproducable with the actual prod build command on the original repo. Just modify the path to include a "#". |
Thanks! |
Describe the bug
The production build of this app won't load the renderer page when its path contains hash sign in Windows.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The app will run normally
Screenshots
Additional context
This is a known issue that WHATWG URL API doesn't expect
#
shown in the path of URL and interpret it as anchor of the web page. Nodejs legacy URL provides better support for native URLs. The WHATWG URL API that Nodejs adopted is not fully compatible with the legacy URL APIs.There are solutions using
url.parse
. But unfortunately it is marked as "deprecated" rather than "legacy" for unknown reason despite the nodejs team said "We've backed off the deprecation of the legacy API". I propose that we can useBrowserWindow.loadFile
provided by electron since it is not marked as deprecated or legacy yet. Although I suppose it uses those Nodejs legacy URL API internally lol.See also
The text was updated successfully, but these errors were encountered: