Open
Description
Minimal example, this works as expected
library(htmltools)
dep <- htmlDependency(
name = "jquery",
version = "1.0.0",
src = c(file = "www/shared"),
script = "jquery.min.js",
package = "shiny"
)
renderDependencies(list(dep))
<script src="www/shared/jquery.min.js"></script>
This does not:
shiny::createWebDependency(dep)
Error in value[[3L]](cond) :
Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'jquery-1.0.0'; `directoryPath` = 'www/shared'
I noticed this in a shiny app that uses crosstalk and leaflet. The dev version of crosstalk::crosstalkLibs()
now returns html dependencies with relative paths which ends up being a problem for this line of leaflet
https://github.com/rstudio/leaflet/blob/44df7d18a2618e0aeecb4145d765e597ec65878b/R/utils.R#L201
Since others might want to use shiny::createWebDependency()
in a similar way, I figured the fix should derive from here.
Metadata
Metadata
Assignees
Labels
No labels