Skip to content

Export shinylive from a staged app directory - #2

Merged
ashbaldry merged 1 commit into
mainfrom
perf/export-shinylive-from-staging-dir
Aug 7, 2026
Merged

Export shinylive from a staged app directory#2
ashbaldry merged 1 commit into
mainfrom
perf/export-shinylive-from-staging-dir

Conversation

@ac-acuity

Copy link
Copy Markdown
Collaborator

shinylive::export() inlines every non dotfile in the app directory into app.json, and it does not honour .Rbuildignore. We already list renv.lock there and it was still going out.

app.json is currently 526 KB, of which renv.lock is 408 KB and renv/activate.R is 40 KB. The Dockerfile, man pages and the Rproj file were shipping too. None of it does anything in a browser.

Added a step that stages only what the app needs to run, then exports from that. 14 files, 20 KB.

shinylive::export() inlines every non dotfile in the app directory into
app.json, and it ignores .Rbuildignore. Exporting from the repo root
meant renv.lock, renv/activate.R, man/, the Dockerfile and the Rproj
file were all downloaded by every visitor.

renv.lock alone is 408 KB of the 526 KB app.json.

Stage only the files the app needs to run. That is 14 files and 20 KB.
@ashbaldry
ashbaldry merged commit d1ca7a5 into main Aug 7, 2026
7 checks passed
@ashbaldry
ashbaldry deleted the perf/export-shinylive-from-staging-dir branch August 7, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants