forked from lucasdillmann/nginx-ignition
-
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.17 KB
/
Copy pathvite.config.ts
File metadata and controls
35 lines (34 loc) · 1.17 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
// @ts-expect-error Types not available
import path from "path"
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"
// https://vitejs.dev/config/
export default defineConfig({
base: "/",
plugins: [react()],
build: {
outDir: "build",
emptyOutDir: true,
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {
entryFileNames: "assets/[name].[hash].js",
chunkFileNames: "assets/[name].[hash].js",
assetFileNames: "assets/[name].[hash].[ext]",
manualChunks: {
"vendor.react": ["react", "react-dom", "react-router-dom"],
"vendor.antd-core": ["antd", "@ant-design/icons"],
"vendor.antd-pro": ["@ant-design/pro-form", "@ant-design/pro-components"],
"vendor.codeium": ["@codeium/react-code-editor"],
"vendor.utils": ["qs", "debounce", "typescript"],
},
},
},
},
resolve: {
alias: {
// @ts-expect-error Types not available
"@": path.resolve(__dirname, "src"),
},
},
})