26 lines
660 B
TypeScript
26 lines
660 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { federation } from "@module-federation/vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react({
|
|
babel: {
|
|
plugins: [["babel-plugin-react-compiler", {}]],
|
|
},
|
|
}),
|
|
federation({
|
|
name: "auth-react-remote",
|
|
manifest: true,
|
|
filename: "remoteEntry.js",
|
|
exposes: {
|
|
"./AuthGuard": "./src/features/auth",
|
|
"./useAuth": "./src/features/auth",
|
|
"./RegisterForm": "./src/features/auth",
|
|
"./LoginForm": "./src/features/auth",
|
|
},
|
|
shared: ["react", "react-dom", "zustand"],
|
|
}),
|
|
],
|
|
});
|