-
Notifications
You must be signed in to change notification settings - Fork 168
Expand file tree
/
Copy pathsnap.txt
More file actions
107 lines (96 loc) · 2.58 KB
/
snap.txt
File metadata and controls
107 lines (96 loc) · 2.58 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
> vp migrate --no-interactive # migration should rewrite imports to vite-plus
VITE+ - The Unified Toolchain for the Web
◇ Migrated . to Vite+<repeat>
• Node <semver> pnpm <semver>
• 2 config updates applied
> test ! -f tsdown.config.json # check tsdown.config.json should be removed
> cat vite.config.ts # check vite.config.ts
import { defineConfig } from 'vite-plus';
export default defineConfig({
staged: {
"*": "vp check --fix"
},
pack: {
"entry": "src/index.ts",
"outDir": "dist",
"format": ["esm", "cjs"],
"dts": true,
"inputOptions": {
"cwd": "./src"
}
},
fmt: {},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
server: {
port: 3000,
},
});
> cat package.json # check package.json
{
"name": "migration-from-tsdown-json-config",
"scripts": {
"build": "vp pack",
"build:watch": "vp pack --watch",
"build:dts": "vp pack --dts",
"prepare": "vp config"
},
"devDependencies": {
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>"
}
> cat pnpm-workspace.yaml # check pnpm-workspace.yaml has overrides and catalog
catalog:
vite: npm:@voidzero-dev/vite-plus-core@latest
vitest: npm:@voidzero-dev/vite-plus-test@latest
vite-plus: latest
overrides:
vite: 'catalog:'
vitest: 'catalog:'
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'
> vp migrate --no-interactive # run migration again to check if it is idempotent
VITE+ - The Unified Toolchain for the Web
This project is already using Vite+! Happy coding!
> cat vite.config.ts # check vite.config.ts
import { defineConfig } from 'vite-plus';
export default defineConfig({
staged: {
"*": "vp check --fix"
},
pack: {
"entry": "src/index.ts",
"outDir": "dist",
"format": ["esm", "cjs"],
"dts": true,
"inputOptions": {
"cwd": "./src"
}
},
fmt: {},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
server: {
port: 3000,
},
});
> cat package.json # check package.json
{
"name": "migration-from-tsdown-json-config",
"scripts": {
"build": "vp pack",
"build:watch": "vp pack --watch",
"build:dts": "vp pack --dts",
"prepare": "vp config"
},
"devDependencies": {
"vite": "catalog:",
"vite-plus": "catalog:"
},
"packageManager": "pnpm@<semver>"
}