https://www.boundaryml.com logo
🟡 VS Code extension playground fails to load due ...
# questions
s
I'm hitting an issue where the VS Code extension playground won't load at all. Getting this error message in the extension window:
Copy code
Unable to preload CSS for /assets/pdf-viewer.css
Error: Unable to preload CSS for /assets/pdf-viewer.css
    at HTMLLinkElement.<anonymous> (https://file+.vscode-resource.vscode-cdn.net/Users/ben/.cursor/extensions/boundary.baml-extension-0.215.2-darwin-arm64/dist/playground/dist/assets/index.js:21:3224)
Details: - Extension version:
0.215.2
- Editor: Cursor (VS Code fork) - OS: macOS 25.1.0 (darwin-arm64) - Error location: Playground webview fails to load due to CSS preload error What's happening: The playground webview is trying to preload
/assets/pdf-viewer.css
but failing, which prevents the entire playground from loading. This looks like a webview resource URI issue - the CSS file path probably isn't being properly converted using
webview.asWebviewUri()
or the file isn't accessible at that path. Impact: BLOCKING - The playground is unusable. Can't test BAML functions with PDF inputs at all, Steps to reproduce: 1. Open a BAML file with PDF inputs (e.g.,
function ExtractPaperContent(paper: pdf)
) 2. Try to open the playground 3. Playground fails to load 4. Check browser console (Developer Tools) - see the CSS preload error Workaround: None that I've found. Tried reloading window, reinstalling extension, clearing cache - nothing works.
a
Have you tried downgrading to 0.215.0 or 0.214.0
s
I was on 214.0 before and tried upgrading to fix the issue, neither worked
I'll try 215.0
Same issue
Copy code
Unable to preload CSS for /assets/pdf-viewer.css
Error: Unable to preload CSS for /assets/pdf-viewer.css
    at HTMLLinkElement.<anonymous> (https://file+.vscode-resource.vscode-cdn.net/Users/ben/.cursor//boundary.baml-extension-0.215.0-darwin-arm64/dist/playground/dist/assets/index.js:21:3224)
I feel like it worked before, so I wouldn't discount the possibility of something I caused, e.g. a bad user settings or conflicting extension (though I think I ruled out the latter, which I'm not even sure is possible)
a
Hmm what about 0.214? Or even 0.210? I think maybe we have a regression if your file has pdf inputs
Does baml cli test still work?
Baml-cli test
s
Yes CLI works
a
Ok we will take a look and see whats upnwith pdfs
s
Thanks! Nice of you to respond on the holidays
a
Fixed [here](https://github.com/BoundaryML/baml/pull/2876), was an issue with Vite: when bundling lazy loaded components it adds absolute paths to CSS files which don't work in VSCode/Electron.
s
Thanks! Sounds like it's not released yet, but looking forward to the next version with this included.
a
Yeah next release
a
i'll be doing a release tomorrow morning
2 Views