-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathvite.config.ts
More file actions
49 lines (48 loc) · 998 Bytes
/
vite.config.ts
File metadata and controls
49 lines (48 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { defineConfig } from "vite";
import federation from "@originjs/vite-plugin-federation";
import path from "path";
import react from "@vitejs/plugin-react-swc";
import tailwindcss from "@tailwindcss/vite";
// https://vite.dev/config/
export default defineConfig({
plugins: [
federation({
name: "care_scribe",
filename: "remoteEntry.js",
exposes: {
"./manifest": "./src/manifest.tsx",
},
shared: ["react", "react-dom", "react-i18next"],
}),
tailwindcss(),
react(),
],
build: {
target: "esnext",
minify: true,
cssCodeSplit: false,
modulePreload: {
polyfill: false,
},
rollupOptions: {
external: [],
input: {
main: "./src/main.tsx",
},
output: {
format: "esm",
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
preview: {
port: 4173,
allowedHosts: true,
host: "0.0.0.0",
cors: true,
},
});