import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import tailwindcss from '@tailwindcss/vite'; import path from 'path'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); // Fresh, never-cached asset path per build. The public CDN in front of // ai.qihuyun.com caches the canonical /assets/*.js|css URLs for 30 days. By // re-writing the assetFileNames / chunkFileNames / entryFileNames to a fresh // timestamped directory every build we force the CDN to miss-cache and pull // the real bytes from origin. const BUILD_STAMP = 'v' + new Date().toISOString().replace(/[-:TZ]/g, '').slice(0, 12); // Vite emits `