-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (34 loc) · 1.03 KB
/
vite.config.ts
File metadata and controls
35 lines (34 loc) · 1.03 KB
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
/* eslint-disable node/no-unpublished-import */
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
root: "src-ui",
base: "/classbot/ui",
publicDir: false,
clearScreen: false,
build: {
outDir: "../lib-ui",
emptyOutDir: false,
rollupOptions: {
output: {
manualChunks: {
react: ["react", "react-dom"],
mui: ["@mui/material"], // XXX Including "@mui/icons-material" significantly slows down the build...
emotion: ["@emotion/react", "@emotion/styled"],
//tanstack: ["@tanstack/react-router", "@tanstack/react-query"],
},
},
},
},
server: {
port: 4000, // TODO Move to dotenv files (when time)
strictPort: true,
// proxy: {
// "/classbot/api": "http://localhost:3000/",
// "/classbot/auth": "http://localhost:3000/",
// },
allowedHosts: ["classbot.do.clusterhack.net", "classbot-test.do.clusterhack.net"],
},
});