-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.documentation.ts
53 lines (52 loc) · 1.08 KB
/
vite.config.documentation.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
49
50
51
52
53
import { qwikVite } from '@builder.io/qwik/optimizer'
import { qwikCity } from '@builder.io/qwik-city/vite'
import { browserslistToTargets } from 'lightningcss'
import browserslist from 'browserslist'
import { defineConfig } from 'vite'
import path from 'node:path'
export default defineConfig({
plugins: [
qwikCity({
routesDir: 'docs/routes',
}),
qwikVite({
client: {
devInput: 'docs/entry.dev.tsx',
outDir: 'docs/dist',
},
ssr: {
input: 'docs/entry.ssr.tsx',
},
srcDir: 'docs',
}),
],
css: {
lightningcss: {
targets: browserslistToTargets(
browserslist(null, {
config: path.join(__dirname, './.browserslistrc'),
}),
),
},
transformer: 'lightningcss',
},
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
},
},
server: {
headers: {
'Cache-Control': 'public, max-age=0',
},
},
resolve: {
alias: {
vscode: './docs/mocks/vscode.ts',
},
},
build: {
outDir: 'docs/dist',
},
publicDir: 'docs/public',
})