Files
SoftwareX/vite.config.ts
User ad0c936ccd Deploy: Add Cloudflare Worker, D1 database integration, and updated README
- Add complete Cloudflare Worker implementation with waitlist API endpoints
- Integrate Cloudflare D1 SQLite database for production waitlist storage
- Add wrangler configuration for Worker deployment and D1 binding
- Rewrite README with comprehensive deployment and architecture documentation
- Update environment configuration and build setup
- Add waitlist utility functions and API client
- Update project dependencies and Vite configuration
- Deploy live to https://react-example.white-glade-ab2c.workers.dev
2026-08-31 08:24:47 +02:00

24 lines
776 B
TypeScript

import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import {defineConfig} from 'vite';
import { cloudflare } from "@cloudflare/vite-plugin";
export default defineConfig(() => {
return {
plugins: [react(), tailwindcss(), cloudflare()],
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
},
},
server: {
// HMR is disabled in AI Studio via DISABLE_HMR env var.
// Do not modify—file watching is disabled to prevent flickering during agent edits.
hmr: process.env.DISABLE_HMR !== 'true',
// Disable file watching when DISABLE_HMR is true to save CPU during agent edits.
watch: process.env.DISABLE_HMR === 'true' ? null : {},
},
};
});