-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (33 loc) · 819 Bytes
/
vite.config.ts
File metadata and controls
35 lines (33 loc) · 819 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
/* eslint-disable import/no-extraneous-dependencies */
import react from "@vitejs/plugin-react";
import { visualizer } from "rollup-plugin-visualizer";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
const isAnalyze = process.env.ANALYZE === "true";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
tsconfigPaths(),
...(isAnalyze
? [
visualizer({
filename: "bundle-report.html",
open: true,
template: "treemap",
gzipSize: true,
brotliSize: true,
}),
]
: []),
],
build: {
rollupOptions: {
output: {
manualChunks: {
vendor: ["react", "react-dom", "react-router-dom"],
},
},
},
},
});