Update vite.config.ts

This commit is contained in:
Michilis
2025-12-12 13:09:31 -03:00
committed by GitHub
parent 519fbe3dd0
commit 53db52e199

View File

@@ -3,12 +3,23 @@ import react from '@vitejs/plugin-react'
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
define: { define: {
global: 'globalThis', global: 'globalThis',
}, },
// dev server (unchanged)
server: { server: {
port: 3000, port: 3000,
}, },
// production preview server (THIS FIXES YOUR ISSUE)
preview: {
host: '127.0.0.1',
port: 4173,
allowedHosts: ['counter.lnpulse.app'],
},
build: { build: {
rollupOptions: { rollupOptions: {
output: { output: {
@@ -19,4 +30,4 @@ export default defineConfig({
}, },
}, },
}, },
}) })