Repository navigation
Expand file tree
/
Copy pathvite.config.ts
More file actions
80 lines (78 loc) 路 1.65 KB
/
Copy pathvite.config.ts
File metadata and controls
80 lines (78 loc) 路 1.65 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite-plus'
const src = (name: string) => fileURLToPath(new URL(`./src/${name}`, import.meta.url))
export default defineConfig({
resolve: {
alias: [
{ find: 'rosepack/jsx-dev-runtime', replacement: src('jsx-dev-runtime.ts') },
{ find: 'rosepack/jsx-runtime', replacement: src('jsx-runtime.ts') },
{ find: /^rosepack$/, replacement: src('index.ts') }
]
},
pack: {
dts: {
tsgo: true
},
entry: [
'src/cli.ts',
'src/http.ts',
'src/index.ts',
'src/jsx-dev-runtime.ts',
'src/jsx-runtime.ts',
'src/vite.ts'
],
exports: true
},
lint: {
options: {
typeAware: true,
typeCheck: true
}
},
fmt: {
quoteProps: 'preserve',
printWidth: 100,
singleQuote: true,
semi: false,
trailingComma: 'none',
tabWidth: 2
},
test: {
typecheck: {
enabled: true
}
},
run: {
cache: {
scripts: false,
tasks: true
},
tasks: {
build: {
command: 'vp pack',
input: [{ auto: true }, '!dist/**'],
output: ['dist/**']
},
check: {
command: 'vp check',
dependsOn: [
'build',
'rosepack-example#typegen',
'rosepack-example-http#typegen',
'rosepack-example-starter#typegen'
],
output: []
},
test: {
command: 'vp test',
dependsOn: [
'build',
'rosepack-example#typegen',
'rosepack-example-http#typegen',
'rosepack-example-starter#typegen'
],
output: []
}
}
}
})