-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
42 lines (39 loc) · 1.05 KB
/
vite.config.ts
File metadata and controls
42 lines (39 loc) · 1.05 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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// Determine the base URL based on deployment target
// For GitHub Pages personal site: https://shivam-tripathi.github.io
// For GitHub Pages project: https://shivam-tripathi.github.io/repo-name
// Update the homepage in package.json accordingly
const base = process.env.VITE_BASE_URL || '/'
export default defineConfig({
plugins: [react()],
base: base,
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler'
}
}
},
build: {
outDir: 'dist',
sourcemap: false,
minify: 'terser',
target: ['es2022'],
rollupOptions: {
output: {
manualChunks: {
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
'markdown-vendor': ['react-markdown', 'remark-gfm', 'remark-math'],
'highlight-vendor': ['rehype-highlight', 'rehype-katex']
}
}
}
},
server: {
port: 3000,
open: true
},
// Support for importing raw text files
assetsInclude: ['**/*.mdx', '**/*.md']
})