35 lines
880 B
TypeScript
35 lines
880 B
TypeScript
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: 'videoRemote',
|
|
filename: 'remoteEntry.js',
|
|
exposes: {
|
|
'./App': './src/App.tsx',
|
|
'./VideoCard': './src/components/VideoCard.tsx',
|
|
},
|
|
shared: {
|
|
react: { singleton: true, eager: true },
|
|
'react-dom': { singleton: true, eager: true },
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
port: 3001,
|
|
host: '0.0.0.0',
|
|
allowedHosts: ['exp-dash', 'localhost', 'usda-dash.ugaif.com'],
|
|
cors: true
|
|
},
|
|
build: {
|
|
target: 'esnext',
|
|
},
|
|
})
|
|
|
|
|