In case this is still useful to anyone, this has been working for me for react apps (bootstrapped w/ create-react-app):
- Edit
package.json setting the top-level homepage property to the content url path of your deployment on Connect, eg:
{
...
"homepage": "my_react_app"
...
}
(will prepend "my_react_app" to static resources in the build which will ensure these are found and loaded in your deployment)
- Build your react app
yarn build
- Deploy w/ rsconnect::deployApp:
library(rsconnect)
rsconnect::deployApp("build",
appFiles = list.files("build", recursive = TRUE),
appPrimaryDoc = "index.html",
appName = "test",
appTitle = "Test",
account = "connect_account",
server = "connect_server"
)