forked from zainabwahab-eth/Fitness-Tracker-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
57 lines (51 loc) · 1.29 KB
/
vite.config.js
File metadata and controls
57 lines (51 loc) · 1.29 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { visualizer } from "rollup-plugin-visualizer";
import viteImagemin from "vite-plugin-imagemin";
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
visualizer({
open: true,
gzipSize: true,
brotliSize: true,
}),
viteImagemin({ // Image optimization
gifsicle: { optimizationLevel: 3 },
mozjpeg: { quality: 80 },
optipng: { optimizationLevel: 5 },
webp: { quality: 80 },
svgo: {
plugins: [
{ name: "removeViewBox", active: false },
{ name: "removeEmptyAttrs", active: false }
]
}
})
],
// Core Configuration
base: "/",
publicDir: "public",
// Development Server
server: {
port: 3000,
host: true, // Expose to network
open: true, // Auto-open browser
strictPort: true,
historyApiFallback: true,
},
// Build Settings
build: {
rollupOptions: {
output: {
manualChunks: {
react: ["react", "react-dom", "react-router-dom"],
redux: ["@reduxjs/toolkit", "react-redux"],
charts: ["recharts"],
formik: ["formik", "yup"]
}
}
}
}
});