Skip to content

Commit a929637

Browse files
authored
Merge pull request #71 from Megasu/vite-ts
基于最新 vue 官方标准完善 tsconfig 相关配置
2 parents 0b932e8 + e5b54aa commit a929637

File tree

4 files changed

+32
-11
lines changed

4 files changed

+32
-11
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
*.local
14+
15+
# Editor directories and files
16+
.idea
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html>
33
<head>
44
<meta charset="UTF-8" />
55
<script>

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"build:mp-weixin": "uni build -p mp-weixin",
3434
"build:quickapp-webview": "uni build -p quickapp-webview",
3535
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
36-
"build:quickapp-webview-union": "uni build -p quickapp-webview-union"
36+
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
37+
"type-check": "vue-tsc --noEmit"
3738
},
3839
"dependencies": {
3940
"@dcloudio/uni-app": "3.0.0-alpha-3061420221216001",
@@ -57,7 +58,9 @@
5758
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3061420221216001",
5859
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3061420221216001",
5960
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3061420221216001",
61+
"@vue/tsconfig": "^0.1.3",
6062
"typescript": "^4.9.4",
61-
"vite": "4.0.3"
63+
"vite": "4.0.3",
64+
"vue-tsc": "^1.0.24"
6265
}
6366
}

tsconfig.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
2+
"extends": "@vue/tsconfig/tsconfig.json",
23
"compilerOptions": {
3-
"target": "esnext",
4-
"useDefineForClassFields": true,
5-
"module": "esnext",
6-
"moduleResolution": "node",
7-
"strict": true,
8-
"jsx": "preserve",
94
"sourceMap": true,
10-
"resolveJsonModule": true,
11-
"esModuleInterop": true,
5+
"baseUrl": ".",
6+
"paths": {
7+
"@/*": ["./src/*"]
8+
},
129
"lib": ["esnext", "dom"],
1310
"types": ["@dcloudio/types"]
1411
},

0 commit comments

Comments
 (0)