DriveGram/frontend/vite.config.ts

31 lines
901 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import { visualizer } from 'rollup-plugin-visualizer'
import path from 'path'
export default defineConfig({
plugins: [
react(),
tailwindcss(),
visualizer({ open: false, gzipSize: true, filename: 'dist/stats.html' }),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
allowedHosts: [
'wonted-zariah-equably.ngrok-free.dev',
'causes-roommate-karaoke-seemed.trycloudflare.com',
'identify-thousands-shell-black.trycloudflare.com',
'upcoming-farms-deployment-build.trycloudflare.com',
'localhost',
],
proxy: {
'/api': process.env.VITE_PROXY_TARGET || 'http://localhost:8080',
'/drivegram.v1': process.env.VITE_PROXY_TARGET || 'http://localhost:8080',
},
},
})