Skip to content

Commit 5c3b668

Browse files
authored
feat(create-app): update svelte-ts template to use @tsconfig/svelte a… (#3668)
1 parent dfab3ed commit 5c3b668

File tree

2 files changed

+7
-22
lines changed

2 files changed

+7
-22
lines changed

packages/create-app/template-svelte-ts/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
"scripts": {
55
"dev": "vite",
66
"build": "vite build",
7-
"serve": "vite preview"
7+
"serve": "vite preview",
8+
"check": "svelte-check --tsconfig ./tsconfig.json"
89
},
910
"devDependencies": {
1011
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.7",
12+
"@tsconfig/svelte": "^2.0.1",
1113
"svelte": "^3.37.0",
14+
"svelte-check": "^2.1.0",
1215
"svelte-preprocess": "^4.7.2",
16+
"tslib": "^2.2.0",
1317
"typescript": "^4.2.4",
1418
"vite": "^2.3.5"
1519
}
16-
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
11
{
2+
"extends": "@tsconfig/svelte/tsconfig.json",
23
"compilerOptions": {
3-
"moduleResolution": "node",
44
"target": "esnext",
55
"module": "esnext",
6-
/**
7-
* svelte-preprocess cannot figure out whether you have
8-
* a value or a type, so tell TypeScript to enforce using
9-
* `import type` instead of `import` for Types.
10-
*/
11-
"importsNotUsedAsValues": "error",
12-
"isolatedModules": true,
136
"resolveJsonModule": true,
14-
/**
15-
* To have warnings / errors of the Svelte compiler at the
16-
* correct position, enable source maps by default.
17-
*/
18-
"sourceMap": true,
19-
"esModuleInterop": true,
20-
"skipLibCheck": true,
21-
"forceConsistentCasingInFileNames": true,
227
"baseUrl": ".",
238
/**
249
* Typecheck JS in `.svelte` and `.js` files by default.
@@ -29,9 +14,5 @@
2914
"allowJs": true,
3015
"checkJs": true
3116
},
32-
/**
33-
* Use global.d.ts instead of compilerOptions.types
34-
* to avoid limiting type declarations.
35-
*/
3617
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"]
3718
}

0 commit comments

Comments
 (0)