-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
48 lines (47 loc) · 1.04 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
import { resolve } from 'node:path';
import { visualizer } from 'rollup-plugin-visualizer';
import solid from 'vike-solid/vite';
import vike from 'vike/plugin';
import type { UserConfig } from 'vite';
export default {
appType: 'custom',
build: {
reportCompressedSize: false,
cssMinify: 'lightningcss'
},
css: {
/*
transformer: 'lightningcss',
lightningcss: {
targets: browserslistToTargets(browserslist('defaults'))
}
*/
},
plugins: [
solid(),
vike({
redirects: {
'/github': 'https://github.com/jspaste',
// TODO: Expose Backend API route locations
'/@documentName/r': '/api/document/@documentName/raw',
'/@documentName/raw': '/api/document/@documentName/raw'
},
prerender: {
partial: true
}
}),
visualizer({
emitFile: true,
filename: 'bundle.html',
template: 'treemap'
})
],
resolve: {
alias: {
'@x-component': resolve('./src/components'),
'@x-hook': resolve('./src/hooks'),
'@x-page': resolve('./src/pages'),
'@x-util': resolve('./src/utils')
}
}
} satisfies UserConfig;