Skip to content

Commit

Permalink
Avoid Partial Content downloads in webR
Browse files Browse the repository at this point in the history
  • Loading branch information
georgestagg committed Jul 13, 2024
1 parent 2baf804 commit 98bbf02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ webr:
cp -r node_modules/webr/dist/. $(BUILD_DIR)/shinylive/webr
curl --fail -L https://github.com/r-wasm/shiny/releases/download/v$(R_SHINY_VERSION)/library.data -o $(BUILD_DIR)/shinylive/webr/library.data
curl --fail -L https://github.com/r-wasm/shiny/releases/download/v$(R_SHINY_VERSION)/library.js.metadata -o $(BUILD_DIR)/shinylive/webr/library.js.metadata
# FIXME: GitHub Pages does not cache Partial Content downloads. Here, we reduce
# the damage by forcing entire file downloads with Emscripten's lazy filesystem.
# Potentially, we can add a switch to Emscripten to disable the mechanism.
sed -i.bak 's/if(!hasByteServing)//' $(BUILD_DIR)/shinylive/webr/R.bin.js

# Copy pyodide.js and .d.ts to src/pyodide/. This is a little weird in that in
# `make all`, it comes after downloading pyodide. In the future we may be able
Expand Down

0 comments on commit 98bbf02

Please sign in to comment.