Skip to content

Commit

Permalink
fix(tsconfigs): Add jsx: 'preserve' to the base template (#10368)
Browse files Browse the repository at this point in the history
* fix(tsconfigs): Add `jsx: 'preserve'` to the base template

* chore: changeset
  • Loading branch information
Princesseuh authored Mar 8, 2024
1 parent b44f830 commit 78bafc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-avocados-sniff.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 3 additions & 1 deletion packages/astro/tsconfigs/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 78bafc5

Please sign in to comment.