Skip to content

Commit

Permalink
Move react-tools.umd.cjs back to react-tools.js to fix script blocking
Browse files Browse the repository at this point in the history
* Change Vite config to output only a UMD build to react-tools.js
* Fix script with nonstandard .cjs extension being blocked in the browser
  when the X-Content-Type-Options: nosniff header is present.
* Fix missing rollup dependencies in package-lock.json by running npm audit fix
  • Loading branch information
glin committed Sep 10, 2024
1 parent 4029c3e commit 6dd6fec
Show file tree
Hide file tree
Showing 8 changed files with 711 additions and 34 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ reactR.Rcheck
reactR_*.tar.gz
*.swp
.DS_Store
inst/www/react-tools/react-tools.js
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: reactR
Type: Package
Title: React Helpers
Version: 0.6.0
Date: 2024-06-26
Version: 0.6.1
Date: 2024-09-09
Authors@R: c(
person(
"Facebook", "Inc"
Expand Down Expand Up @@ -46,5 +46,5 @@ Suggests:
knitr,
usethis,
jsonlite
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
VignetteBuilder: knitr
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# reactR 0.6.1

* Fix issue where the `react-tools.umd.cjs` script could be blocked by the browser in some cases, such as apps deployed on shinyapps.io [#86](https://github.com/react-R/reactR/issues/86)

# reactR 0.6.0

* retain `list` in `reactR::component` classes [#82](https://github.com/react-R/reactR/issues/82)
Expand Down
2 changes: 1 addition & 1 deletion R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ html_dependency_reacttools <- function(){
src = "www/react-tools",
version = "2.0.0",
package = "reactR",
script = c("react-tools.umd.cjs")
script = c("react-tools.js")
)
}

Expand Down
1 change: 1 addition & 0 deletions inst/www/react-tools/react-tools.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion inst/www/react-tools/react-tools.umd.cjs

This file was deleted.

Loading

0 comments on commit 6dd6fec

Please sign in to comment.