diff --git a/.changeset/thin-grapes-dance.md b/.changeset/thin-grapes-dance.md new file mode 100644 index 000000000000..ce071dfdb3e5 --- /dev/null +++ b/.changeset/thin-grapes-dance.md @@ -0,0 +1,5 @@ +--- +'create-svelte': patch +--- + +create-svelte: globals.d.ts TSDoc fixes, add vite/client types to js/tsconfig diff --git a/packages/create-svelte/cli/modifications/add_typescript.js b/packages/create-svelte/cli/modifications/add_typescript.js index 285d78a7429a..326812b2b335 100644 --- a/packages/create-svelte/cli/modifications/add_typescript.js +++ b/packages/create-svelte/cli/modifications/add_typescript.js @@ -17,7 +17,6 @@ export default async function add_typescript(cwd, yes) { update_component(cwd, 'src/routes/index.svelte', [[' + * + * ``` + */ +declare module '*.(gif|jpg|jpeg|png|svg|webp)' { + const value: string; + export = value; +} +//#endregion diff --git a/packages/create-svelte/template/jsconfig.json b/packages/create-svelte/template/jsconfig.json index e5f26af2a360..f33a80550d85 100644 --- a/packages/create-svelte/template/jsconfig.json +++ b/packages/create-svelte/template/jsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "baseUrl": ".", "paths": { "$app/*": [".svelte/dev/runtime/app/*", ".svelte/build/runtime/app/*"], "$lib/*": ["src/lib/*"] diff --git a/packages/create-svelte/template/src/routes/index.svelte b/packages/create-svelte/template/src/routes/index.svelte index a491adb5bc46..f08c6512f71b 100644 --- a/packages/create-svelte/template/src/routes/index.svelte +++ b/packages/create-svelte/template/src/routes/index.svelte @@ -6,6 +6,7 @@
Visit svelte.dev to learn how to build Svelte apps.
diff --git a/packages/create-svelte/ts-template/src/globals.d.ts b/packages/create-svelte/ts-template/src/globals.d.ts deleted file mode 100644 index ef3b4bfef94a..000000000000 --- a/packages/create-svelte/ts-template/src/globals.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -///