Skip to content

Commit

Permalink
[fix] check for app.d.ts rather than global.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Mar 11, 2022
1 parent 800e996 commit 354cb31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-pens-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

[fix] check for app.d.ts rather than global.d.ts
4 changes: 2 additions & 2 deletions packages/create-svelte/scripts/build-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 354cb31

Please sign in to comment.