Update vite.config.ts
This commit is contained in:
@@ -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({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user