From 2a18de132b9e8956032444ddd81c18902a1f0e32 Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Mon, 16 Mar 2026 11:12:41 -0700 Subject: [PATCH] fix: revert vocs.config.tsx to .ts to fix Vercel SSR The Vocs SSR bundle hardcodes an import to dist/server/vocs.config.js. When the source file is .tsx, Vite outputs it differently, causing ERR_MODULE_NOT_FOUND and 500 errors on every page. - Rename vocs.config.tsx back to vocs.config.ts - Replace JSX with React.createElement calls for gtag head config - Update biome.json override to match new filename --- biome.json | 2 +- vocs.config.tsx => vocs.config.ts | 29 ++++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) rename vocs.config.tsx => vocs.config.ts (97%) diff --git a/biome.json b/biome.json index 14375d27..35a9d884 100644 --- a/biome.json +++ b/biome.json @@ -60,7 +60,7 @@ }, "overrides": [ { - "includes": ["vocs.config.tsx"], + "includes": ["vocs.config.ts"], "linter": { "rules": { "security": { diff --git a/vocs.config.tsx b/vocs.config.ts similarity index 97% rename from vocs.config.tsx rename to vocs.config.ts index 26678d9e..82c5ae11 100644 --- a/vocs.config.tsx +++ b/vocs.config.ts @@ -1,3 +1,4 @@ +import { createElement, Fragment } from 'react' import { Changelog, defineConfig, McpSource } from 'vocs/config' import { createFeedbackAdapter } from './src/lib/feedback-adapter' @@ -15,19 +16,21 @@ const baseUrl = (() => { })() export default defineConfig({ - head: gaMeasurementId ? ( - <> -