import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import federation from '@originjs/vite-plugin-federation' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ plugins: [ react(), tailwindcss(), federation({ name: 'schedulingRemote', filename: 'remoteEntry.js', exposes: { './App': './src/App.tsx', }, shared: { react: { singleton: true, eager: true }, 'react-dom': { singleton: true, eager: true }, }, }), ], server: { port: 3003, host: '0.0.0.0', allowedHosts: ['exp-dash', 'localhost', 'usda-dash.ugaif.com'], cors: true }, build: { target: 'esnext', rollupOptions: { output: { // Add hash to filenames for cache busting entryFileNames: 'assets/[name]-[hash].js', chunkFileNames: 'assets/[name]-[hash].js', assetFileNames: 'assets/[name]-[hash].[ext]', }, }, }, })