Update vite.config.ts
Browse files- vite.config.ts +7 -4
vite.config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import tailwindcss from '@tailwindcss/vite';
|
| 2 |
import react from '@vitejs/plugin-react';
|
| 3 |
import path from 'path';
|
| 4 |
-
import {defineConfig} from 'vite';
|
| 5 |
|
| 6 |
export default defineConfig(() => {
|
| 7 |
return {
|
|
@@ -12,11 +12,14 @@ export default defineConfig(() => {
|
|
| 12 |
},
|
| 13 |
},
|
| 14 |
server: {
|
|
|
|
|
|
|
|
|
|
| 15 |
// HMR is disabled in AI Studio via DISABLE_HMR env var.
|
| 16 |
-
// Do not modifyâfile watching is disabled to prevent flickering during agent edits.
|
| 17 |
hmr: process.env.DISABLE_HMR !== 'true',
|
| 18 |
-
|
|
|
|
| 19 |
watch: process.env.DISABLE_HMR === 'true' ? null : {},
|
| 20 |
},
|
| 21 |
};
|
| 22 |
-
});
|
|
|
|
| 1 |
import tailwindcss from '@tailwindcss/vite';
|
| 2 |
import react from '@vitejs/plugin-react';
|
| 3 |
import path from 'path';
|
| 4 |
+
import { defineConfig } from 'vite';
|
| 5 |
|
| 6 |
export default defineConfig(() => {
|
| 7 |
return {
|
|
|
|
| 12 |
},
|
| 13 |
},
|
| 14 |
server: {
|
| 15 |
+
host: '0.0.0.0',
|
| 16 |
+
allowedHosts: ['eissa-newtest.hf.space'],
|
| 17 |
+
|
| 18 |
// HMR is disabled in AI Studio via DISABLE_HMR env var.
|
|
|
|
| 19 |
hmr: process.env.DISABLE_HMR !== 'true',
|
| 20 |
+
|
| 21 |
+
// Disable file watching when DISABLE_HMR is true
|
| 22 |
watch: process.env.DISABLE_HMR === 'true' ? null : {},
|
| 23 |
},
|
| 24 |
};
|
| 25 |
+
});
|