From b9c393a18c2af6686a3bbe05a1bef6344441bc5d Mon Sep 17 00:00:00 2001 From: bluwy Date: Fri, 3 Nov 2023 14:15:40 +0800 Subject: [PATCH 1/2] chore: update tsconfig setup --- packages/e2e-tests/inspector-vite/jsconfig.json | 6 +++--- packages/e2e-tests/svelte-preprocess/tsconfig.json | 6 +++--- packages/e2e-tests/tsconfig.json | 6 +++--- .../playground/big-component-library-vite-ssr/jsconfig.json | 2 +- packages/playground/big-component-library/jsconfig.json | 6 +++--- packages/playground/optimizedeps-include/jsconfig.json | 6 +++--- packages/vite-plugin-svelte-inspector/tsconfig.json | 4 ++-- packages/vite-plugin-svelte/src/handle-hot-update.js | 2 +- packages/vite-plugin-svelte/src/utils/watch.js | 2 +- packages/vite-plugin-svelte/tsconfig.json | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/e2e-tests/inspector-vite/jsconfig.json b/packages/e2e-tests/inspector-vite/jsconfig.json index 7ed0c376b..ecaa58acb 100644 --- a/packages/e2e-tests/inspector-vite/jsconfig.json +++ b/packages/e2e-tests/inspector-vite/jsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "moduleResolution": "node", - "target": "esnext", - "module": "esnext", + "moduleResolution": "Node16", + "target": "ESNext", + "module": "ESNext", /** * svelte-preprocess cannot figure out whether you have * a value or a type, so tell TypeScript to enforce using diff --git a/packages/e2e-tests/svelte-preprocess/tsconfig.json b/packages/e2e-tests/svelte-preprocess/tsconfig.json index bc54e3c80..717c57741 100644 --- a/packages/e2e-tests/svelte-preprocess/tsconfig.json +++ b/packages/e2e-tests/svelte-preprocess/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "moduleResolution": "node", - "target": "esnext", - "module": "esnext", + "moduleResolution": "Bundler", + "target": "ESNext", + "module": "ESNext", /** * svelte-preprocess cannot figure out whether you have * a value or a type, so tell TypeScript to enforce using diff --git a/packages/e2e-tests/tsconfig.json b/packages/e2e-tests/tsconfig.json index de36077ab..363470ae6 100644 --- a/packages/e2e-tests/tsconfig.json +++ b/packages/e2e-tests/tsconfig.json @@ -2,14 +2,14 @@ "include": ["."], "exclude": ["**/dist/**", "**/build/**", "**/node_modules/**"], "compilerOptions": { - "target": "esnext", - "module": "esnext", + "target": "ESNext", + "module": "ESNext", "outDir": "dist", "baseUrl": ".", "allowJs": true, "esModuleInterop": true, "resolveJsonModule": true, - "moduleResolution": "node", + "moduleResolution": "Bundler", "skipLibCheck": true, "noUnusedLocals": true, "jsx": "preserve", diff --git a/packages/playground/big-component-library-vite-ssr/jsconfig.json b/packages/playground/big-component-library-vite-ssr/jsconfig.json index 913970cf8..20cc0be91 100644 --- a/packages/playground/big-component-library-vite-ssr/jsconfig.json +++ b/packages/playground/big-component-library-vite-ssr/jsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "moduleResolution": "Node", + "moduleResolution": "Bundler", "target": "ESNext", "module": "ESNext", /** diff --git a/packages/playground/big-component-library/jsconfig.json b/packages/playground/big-component-library/jsconfig.json index 7ed0c376b..e0fe30cb3 100644 --- a/packages/playground/big-component-library/jsconfig.json +++ b/packages/playground/big-component-library/jsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "moduleResolution": "node", - "target": "esnext", - "module": "esnext", + "moduleResolution": "Bundler", + "target": "ESNext", + "module": "ESNext", /** * svelte-preprocess cannot figure out whether you have * a value or a type, so tell TypeScript to enforce using diff --git a/packages/playground/optimizedeps-include/jsconfig.json b/packages/playground/optimizedeps-include/jsconfig.json index 7ed0c376b..e0fe30cb3 100644 --- a/packages/playground/optimizedeps-include/jsconfig.json +++ b/packages/playground/optimizedeps-include/jsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "moduleResolution": "node", - "target": "esnext", - "module": "esnext", + "moduleResolution": "Bundler", + "target": "ESNext", + "module": "ESNext", /** * svelte-preprocess cannot figure out whether you have * a value or a type, so tell TypeScript to enforce using diff --git a/packages/vite-plugin-svelte-inspector/tsconfig.json b/packages/vite-plugin-svelte-inspector/tsconfig.json index 90b557e70..b567125a3 100644 --- a/packages/vite-plugin-svelte-inspector/tsconfig.json +++ b/packages/vite-plugin-svelte-inspector/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "noEmit": true, "target": "ES2020", - "module": "ES2022", - "moduleResolution": "node", + "module": "Node16", + "moduleResolution": "Node16", "strict": true, "noUnusedLocals": true, "baseUrl": ".", diff --git a/packages/vite-plugin-svelte/src/handle-hot-update.js b/packages/vite-plugin-svelte/src/handle-hot-update.js index 6f2f78c85..46b9cf1cc 100644 --- a/packages/vite-plugin-svelte/src/handle-hot-update.js +++ b/packages/vite-plugin-svelte/src/handle-hot-update.js @@ -7,7 +7,7 @@ import { toRollupError } from './utils/error.js'; * @param {Function} compileSvelte * @param {import('vite').HmrContext} ctx * @param {import('./types/id.d.ts').SvelteRequest} svelteRequest - * @param {import('./utils/vite-plugin-svelte-cache').VitePluginSvelteCache} cache + * @param {import('./utils/vite-plugin-svelte-cache.js').VitePluginSvelteCache} cache * @param {import('./types/options.d.ts').ResolvedOptions} options * @returns {Promise} */ diff --git a/packages/vite-plugin-svelte/src/utils/watch.js b/packages/vite-plugin-svelte/src/utils/watch.js index 70f3b33e3..007578468 100644 --- a/packages/vite-plugin-svelte/src/utils/watch.js +++ b/packages/vite-plugin-svelte/src/utils/watch.js @@ -5,7 +5,7 @@ import path from 'node:path'; /** * @param {import('../types/options.d.ts').ResolvedOptions} options - * @param {import('./vite-plugin-svelte-cache').VitePluginSvelteCache} cache + * @param {import('./vite-plugin-svelte-cache.js').VitePluginSvelteCache} cache * @param {import('../types/id.d.ts').IdParser} requestParser * @returns {void} */ diff --git a/packages/vite-plugin-svelte/tsconfig.json b/packages/vite-plugin-svelte/tsconfig.json index 753c44ebb..7026c5c3f 100644 --- a/packages/vite-plugin-svelte/tsconfig.json +++ b/packages/vite-plugin-svelte/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "noEmit": true, "target": "ES2020", - "module": "ES2022", - "moduleResolution": "node", + "module": "Node16", + "moduleResolution": "Node16", "strict": true, "noUnusedLocals": true, "baseUrl": ".", From 4199740887840a24ac268e5ab96997ff3fecd9af Mon Sep 17 00:00:00 2001 From: bluwy Date: Fri, 3 Nov 2023 14:38:28 +0800 Subject: [PATCH 2/2] chore: use target es2022 --- packages/vite-plugin-svelte-inspector/tsconfig.json | 2 +- packages/vite-plugin-svelte/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vite-plugin-svelte-inspector/tsconfig.json b/packages/vite-plugin-svelte-inspector/tsconfig.json index b567125a3..742202f01 100644 --- a/packages/vite-plugin-svelte-inspector/tsconfig.json +++ b/packages/vite-plugin-svelte-inspector/tsconfig.json @@ -2,7 +2,7 @@ "include": ["src"], "compilerOptions": { "noEmit": true, - "target": "ES2020", + "target": "ES2022", "module": "Node16", "moduleResolution": "Node16", "strict": true, diff --git a/packages/vite-plugin-svelte/tsconfig.json b/packages/vite-plugin-svelte/tsconfig.json index 7026c5c3f..2bc6a221f 100644 --- a/packages/vite-plugin-svelte/tsconfig.json +++ b/packages/vite-plugin-svelte/tsconfig.json @@ -2,7 +2,7 @@ "include": ["src"], "compilerOptions": { "noEmit": true, - "target": "ES2020", + "target": "ES2022", "module": "Node16", "moduleResolution": "Node16", "strict": true,