diff --git a/.changeset/wise-pens-ring.md b/.changeset/wise-pens-ring.md new file mode 100644 index 000000000000..7eac81ed249c --- /dev/null +++ b/.changeset/wise-pens-ring.md @@ -0,0 +1,5 @@ +--- +'create-svelte': patch +--- + +[fix] check for app.d.ts rather than global.d.ts diff --git a/packages/create-svelte/scripts/build-templates.js b/packages/create-svelte/scripts/build-templates.js index a3061e5482ce..f05e4a93e6fa 100644 --- a/packages/create-svelte/scripts/build-templates.js +++ b/packages/create-svelte/scripts/build-templates.js @@ -66,10 +66,10 @@ async function generate_templates(shared) { const js = []; for (const file of ts) { - // The global.d.ts file makes TS/JS aware of some ambient modules, which are + // The app.d.ts file makes TS/JS aware of some ambient modules, which are // also needed for JS projects if people turn on "checkJs" in their jsonfig if (file.name.endsWith('.d.ts')) { - if (file.name.endsWith('global.d.ts')) js.push(file); + if (file.name.endsWith('app.d.ts')) js.push(file); } else if (file.name.endsWith('.ts')) { const transformed = transform(file.contents, { transforms: ['typescript']