-
Notifications
You must be signed in to change notification settings - Fork 184
solara_cdn is broken in vscode #761
Description
Seems like at some point we've had a regression - math rendering, mermaid, griddraggable, and other components that rely on our template this.getCdn / this.getJupyterBaseUrl machinery and requirejs are broken in vscode.
It seems that vscode attempts to load resources with relative paths from the current directory, i.e. for a notebook in /Users/x/Code/example/, it will looks for the cdn in /Users/x/Code/example/_solara/cdn/.
The error then reads something like:
Error: Unable to read file '/Users/x/Code/example/_solara/cdn/@widgetti/[email protected]/dist/index.min.js' (Error: Unable to resolve nonexistent file '/Users/x/example/_solara/cdn/@widgetti/[email protected]/dist/index.min.js')
Within the iframes that render cell contents, we have the following
document.getElementsByTagName("base").length: 1,
document.body.dataset.baseUrl: https://file%2B.vscode-resource.vscode-cdn.net/Users/x/.vscode/extensions/ms-toolsai.jupyter-2024.7.0-darwin-arm64/temp/scripts/973c83f5a03f3bf85c6238a4779b0ccaedd49c55474cf78b500e5991c6c563b4/jupyter/
document.baseURI: https://file+.vscode-resource.vscode-cdn.net/Users/x/Code/example/