socket
socket copied to clipboard
Support configuration for initial navigation
We should support configuring an initial navigation URI in the socket.ini
:
[window.navigator]
location = "socket://com.app/path/to/index.html"
or
[window.navigator]
location = "/index.html"
or
[window.navigator]
location = "/" # implies /index.html
Currently we can see a jerk when index.html loads in app window.We should be able to show a custom spinner while loading index.html and other assets.
The lack of configuration here is a problem for some SPA frameworks that use client-side routing (such as Nuxt). Unless I manually configure the path /index.html
, Nuxt shows a 404 when the app initially loads. At the very least, being able to configure /
as the default could solve this problem.
You can try this:
[webview]
default_index = "/index.html"
This will be loaded for any type of page navigation