43 lines
895 B
TypeScript
43 lines
895 B
TypeScript
import path from "path"
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
import federation from "@originjs/vite-plugin-federation";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [federation({
|
|
name: "care_scribe",
|
|
filename: "remoteEntry.js",
|
|
exposes: {
|
|
"./manifest": "./src/manifest.ts",
|
|
},
|
|
shared: ["react", "react-dom"],
|
|
}),
|
|
react(),],
|
|
build: {
|
|
target: "esnext",
|
|
minify: false,
|
|
cssCodeSplit: false,
|
|
modulePreload: {
|
|
polyfill: false,
|
|
},
|
|
rollupOptions: {
|
|
external: [],
|
|
input: {
|
|
main: "./src/main.tsx",
|
|
},
|
|
output: {
|
|
format: "esm",
|
|
entryFileNames: "assets/[name].js",
|
|
chunkFileNames: "assets/[name].js",
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
base: "./"
|
|
})
|