-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
36 lines (35 loc) · 934 Bytes
/
vite.config.ts
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
import react from "@vitejs/plugin-react";
import { bundleStats } from "rollup-plugin-bundle-stats";
import { visualizer } from "rollup-plugin-visualizer";
import { defineConfig, loadEnv } from "vite";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd());
return {
base: env.VITE_BASE_NAME,
build: {
chunkSizeWarningLimit: 2600,
external: ["^@arcgis/", "^@esri/"],
rollupOptions: {
output: {
assetFileNames: "assets/[name].[hash][extname]",
chunkFileNames: "assets/[name].[hash].js",
entryFileNames: "assets/[name].[hash].js"
}
}
},
plugins: [
bundleStats({
baseline: true,
json: true
}),
react(),
visualizer({
brotliSize: true,
filename: "./dist/stats.html",
gzipSize: true,
open: true,
template: "sunburst"
})
]
};
});