diff --git a/package.json b/package.json index 921350b..89159b9 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "build": "vite build", "package": "svelte-kit package", "preview": "vite preview", - "check": "svelte-check --tsconfig ./jsconfig.json", - "check:watch": "svelte-check --tsconfig ./jsconfig.json --watch", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "test": "playwright test", "lint": "prettier --check --plugin-search-dir=. . && eslint .", "format": "prettier --write --plugin-search-dir=. ." diff --git a/src/app.d.ts b/src/app.d.ts index f69cbcb..719a913 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,11 +1,11 @@ -// See https://kit.svelte.dev/docs/types#app -// for information about these interfaces -// and what to do when importing types -declare namespace App { - // interface Locals {} - // interface Platform {} - // interface PrivateEnv {} - // interface PublicEnv {} - // interface Session {} - // interface Stuff {} +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } } + +export {}; diff --git a/svelte.config.js b/svelte.config.js index ffd68ed..fcf06bd 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,13 +1,9 @@ -import adapter from '@sveltejs/adapter-node'; -import preprocess from 'svelte-preprocess'; +import adapter from '@sveltejs/adapter-auto'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; /** @type {import('@sveltejs/kit').Config} */ const config = { - // preprocess: [ - // preprocess({ - // postcss: true - // }) - // ], + preprocess: vitePreprocess(), kit: { adapter: adapter() } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..9e230eb --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + } + \ No newline at end of file diff --git a/vite.config.js b/vite.config.ts similarity index 100% rename from vite.config.js rename to vite.config.ts