Skip to content

Commit

Permalink
feat(create-vite): tsconfig support vite.config.ts (#6324)
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho authored Jan 17, 2022
1 parent e87ae41 commit bfbdb22
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 7 deletions.
3 changes: 1 addition & 2 deletions packages/create-vite/template-lit-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "./types",
"rootDir": "./src",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand All @@ -18,5 +17,5 @@
"useDefineForClassFields": false
},
"include": ["src/**/*.ts"],
"exclude": []
"references": [{ "path": "./tsconfig.node.json" }]
}
8 changes: 8 additions & 0 deletions packages/create-vite/template-lit-ts/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["vite.config.ts"]
}
3 changes: 2 additions & 1 deletion packages/create-vite/template-preact-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment"
},
"include": ["src"]
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
8 changes: 8 additions & 0 deletions packages/create-vite/template-preact-ts/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["vite.config.ts"]
}
3 changes: 2 additions & 1 deletion packages/create-vite/template-react-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["./src"]
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
8 changes: 8 additions & 0 deletions packages/create-vite/template-react-ts/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["vite.config.ts"]
}
3 changes: 2 additions & 1 deletion packages/create-vite/template-svelte-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"allowJs": true,
"checkJs": true
},
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"]
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
"references": [{ "path": "./tsconfig.node.json" }]
}
8 changes: 8 additions & 0 deletions packages/create-vite/template-svelte-ts/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["vite.config.ts"]
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"noUnusedParameters": true,
"noImplicitReturns": true
},
"include": ["./src"]
"include": ["src"]
}
3 changes: 2 additions & 1 deletion packages/create-vite/template-vue-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"esModuleInterop": true,
"lib": ["esnext", "dom"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}
8 changes: 8 additions & 0 deletions packages/create-vite/template-vue-ts/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
},
"include": ["vite.config.ts"]
}

0 comments on commit bfbdb22

Please sign in to comment.