-
Notifications
You must be signed in to change notification settings - Fork 18
Description
When exporting multiple apps to the same destdir (via subdir, see #59), the result does not let me use the base url (e.g. example.com/app1); instead I need to navigate directly to the index.html file (e.g. example.com/app1/index.html).
Here's a how to reproduce:
shinylive::export("src/app1", "build", subdir = "app1")
shinylive::export("src/app2", "build", subdir = "app2")
httpuv::runStaticServer("build")Then navigating to http://127.0.0.1:7446/app1/index.html will work, but navigating to http://127.0.0.1:7446/app1 fail because it 404s trying to load "app.json".
The reason for this is that shinylive.js attempts to load "./app.json", which is http://127.0.0.1:7446/app1/app.json when index.html is in the URL, but then incorrectly http://127.0.0.1:7446/app.json when the url does not have the index.html.
A similar problem is with the edit links -- http://127.0.0.1:7446/app1/edit redirects to http://127.0.0.1:7446/index.html?_shinylive-mode=editor-terminal-viewer instead of http://127.0.0.1:7446/app1/index.html?_shinylive-mode=editor-terminal-viewer