-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
44 lines (42 loc) · 1.05 KB
/
vite.config.ts
File metadata and controls
44 lines (42 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
42
43
44
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import sitemap from 'vite-plugin-sitemap'
const dynamicRoutes = ['/about', '/quickpictureviewer', '/plaincolor', '/szcontext', '/quickcolorpicker']
export default defineConfig({
plugins: [
react(),
sitemap({
outDir: 'docs',
hostname: 'https://moduleart.github.io/',
robots: [{ userAgent: '*', allow: '/', disallow: '/assets' }],
dynamicRoutes,
}),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
'~': resolve(__dirname, './node_modules'),
},
},
build: {
outDir: 'docs',
emptyOutDir: true,
minify: 'terser',
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
// @ts-expect-error custom options for beasties used by vite-react-ssg
ssgOptions: {
beastiesOptions: {
// E.g., change the preload strategy
preload: 'media',
// Other options: https://github.com/danielroe/beasties#usage
},
},
})