44 lines
941 B
TypeScript
44 lines
941 B
TypeScript
import federation from "@originjs/vite-plugin-federation";
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
federation({
|
|
name: "care_abdm",
|
|
filename: "remoteEntry.js",
|
|
exposes: {
|
|
"./manifest": "./src/manifest.ts",
|
|
},
|
|
shared: ["react", "react-dom", "react-i18next", "@tanstack/react-query"],
|
|
}),
|
|
react(),
|
|
],
|
|
build: {
|
|
target: "esnext",
|
|
minify: false,
|
|
cssCodeSplit: false,
|
|
modulePreload: {
|
|
polyfill: false,
|
|
},
|
|
rollupOptions: {
|
|
external: [],
|
|
input: {
|
|
main: "./src/index.ts",
|
|
},
|
|
output: {
|
|
format: "esm",
|
|
entryFileNames: "assets/[name].js",
|
|
chunkFileNames: "assets/[name].js",
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
envPrefix: "REACT_",
|
|
});
|