36 lines
992 B
TypeScript
36 lines
992 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { federation } from "@module-federation/vite";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
shared: path.resolve(__dirname, "src/shared"),
|
|
entities: path.resolve(__dirname, "src/entities"),
|
|
features: path.resolve(__dirname, "src/features"),
|
|
widgets: path.resolve(__dirname, "src/widgets"),
|
|
app: path.resolve(__dirname, "src/app"),
|
|
},
|
|
},
|
|
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"],
|
|
}),
|
|
],
|
|
});
|