From 53db52e1995897a44f50855e9718e042fbe4a50e Mon Sep 17 00:00:00 2001 From: Michilis <120072772+Michilis@users.noreply.github.com> Date: Fri, 12 Dec 2025 13:09:31 -0300 Subject: [PATCH] Update vite.config.ts --- vite.config.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index e40adf1..6cd9e3a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,12 +3,23 @@ import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], + define: { global: 'globalThis', }, + + // dev server (unchanged) server: { port: 3000, }, + + // production preview server (THIS FIXES YOUR ISSUE) + preview: { + host: '127.0.0.1', + port: 4173, + allowedHosts: ['counter.lnpulse.app'], + }, + build: { rollupOptions: { output: { @@ -19,4 +30,4 @@ export default defineConfig({ }, }, }, -}) \ No newline at end of file +})