import { defineConfig, loadEnv } from 'vite' import react from '@vitejs/plugin-react-swc' // https://vite.dev/config/ export default ({ mode }) => { // load .env files manually const env = loadEnv(mode, process.cwd(), '') // '' = no prefix filtering const base = env.VITE_PUBLIC_URL || '/' return defineConfig({ plugins: [react()], base }) }