import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' import path from 'node:path' import { fileURLToPath } from 'node:url' const __dirname = path.dirname(fileURLToPath(import.meta.url)) // https://vite.dev/config/ export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, './src'), }, }, plugins: [ react({ babel: { plugins: [['babel-plugin-react-compiler']], }, }), tailwindcss(), ], server: { proxy: { '/drupal-api': { target: 'http://localhost:8081', changeOrigin: true, rewrite: (path) => path.replace(/^\/drupal-api/, ''), }, }, }, })