Skip to content

Comments

Fix SSR problems with client only code#602

Merged
bendera merged 5 commits intovscode-elements:mainfrom
kiberonlabsdev:main
Feb 21, 2026
Merged

Fix SSR problems with client only code#602
bendera merged 5 commits intovscode-elements:mainfrom
kiberonlabsdev:main

Conversation

@kiberonlabsdev
Copy link
Contributor

@kiberonlabsdev kiberonlabsdev commented Feb 18, 2026

This addresses SSR problems because of client only code. This PR adds guards and delays so that imports to the vscode library don't cause immediate errors even if the actual imported component isn't one of the 2 components included here

Copilot AI and others added 5 commits February 18, 2026 13:26
Co-authored-by: kiberonlabsdev <210491275+kiberonlabsdev@users.noreply.github.com>
Co-authored-by: kiberonlabsdev <210491275+kiberonlabsdev@users.noreply.github.com>
…support

Add SSR guards for CSS stylesheet operations
@bendera
Copy link
Member

bendera commented Feb 21, 2026

This is not a generic component library, but is intended to be used within a VS Code webview. What real-world use case does this PR address?

@kiberonlabsdev
Copy link
Contributor Author

Exactly as mentioned. The code currently breaks during server side rendering or any other context that doesnt directly have a browser context. The fix introduces zero regression and is easily fixable. It's currently breaking my system and requiring me to use unnecessary libraries to fake a browser context for code that isn't being used but is on the import path

@bendera bendera merged commit 895c35e into vscode-elements:main Feb 21, 2026
5 of 6 checks passed
@bendera
Copy link
Member

bendera commented Feb 21, 2026

Thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants