diff --git a/web/index.html b/web/index.html index 934e76c..100d9fb 100644 --- a/web/index.html +++ b/web/index.html @@ -15,7 +15,13 @@
- + diff --git a/web/vite.config.ts b/web/vite.config.ts index fac8819..0e21f22 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -5,6 +5,12 @@ import { resolve } from 'path'; // https://vitejs.dev/config/ export default defineConfig({ + define: { + // Some pre-compiled npm packages use __publicField (a TypeScript/esbuild helper) + // without bundling it. Rewrite bare references to a globalThis property that + // we polyfill in index.html before any module code runs. + '__publicField': 'globalThis.__publicField', + }, plugins: [ react(), TanStackRouterVite(),