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 +})