Upload vite.config.ts with huggingface_hub
Browse files- vite.config.ts +22 -0
vite.config.ts
ADDED
|
@@ -0,0 +1,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 {
|
| 8 |
+
plugins: [react(), tailwindcss()],
|
| 9 |
+
resolve: {
|
| 10 |
+
alias: {
|
| 11 |
+
'@': path.resolve(__dirname, '.'),
|
| 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 |
+
// Disable file watching when DISABLE_HMR is true to save CPU during agent edits.
|
| 19 |
+
watch: process.env.DISABLE_HMR === 'true' ? null : {},
|
| 20 |
+
},
|
| 21 |
+
};
|
| 22 |
+
});
|