1. cd header-app
2. npm install
3. npm run build
4. npm run preview
5. run in http://localhost:4173/
1. cd content-app
2. npm install
3. npm run build
4. npm run preview
5. run in http://localhost:4174/
1. cd main-app
2. npm install
3. npm run dev
4. http://localhost:5173/
export default defineConfig({
plugins: [
react(),
federation({
name: 'mainApp',
remotes: {
headerApp: 'http://localhost:4173/assets/remoteEntry.js',
contentApp: 'http://localhost:4174/assets/remoteEntry.js',
},
}),
],
build: {
target: 'esnext',
},
server: {
cors: true,
}
});