fix(packages): add server-only bundles (#1349)

This commit is contained in:
rahim
2026-04-16 00:59:14 -07:00
committed by GitHub
parent 4ecc870685
commit 3331fdaf25
60 changed files with 654 additions and 215 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
/** Create an `HTMLTemplateElement` from an HTML string, or `null` when `document` is unavailable (SSR). */
export function createTemplate(html: string): HTMLTemplateElement | null {
const doc = globalThis.document;
if (!doc) return null;
if (!__BROWSER__) return null;
const template = doc.createElement('template');
const template = document.createElement('template');
template.innerHTML = html;
return template;
}