0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

fix(tsconfigs): Add jsx: 'preserve' to the base template (#10368)

* fix(tsconfigs): Add `jsx: 'preserve'` to the base template

* chore: changeset
This commit is contained in:
Erika 2024-03-08 14:45:43 +01:00 committed by GitHub
parent b44f830a0e
commit 78bafc5d66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Updates the base `tsconfig.json` preset with `jsx: 'preserve'` in order to fix errors when importing Astro files inside `.js` and `.ts` files.

View file

@ -24,6 +24,8 @@
// Skip typechecking libraries and .d.ts files
"skipLibCheck": true,
// Allow JavaScript files to be imported
"allowJs": true
"allowJs": true,
// Allow JSX files (or files that are internally considered JSX, like Astro files) to be imported inside `.js` and `.ts` files.
"jsx": "preserve"
}
}