Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Mar 8, 2024

Changes

Despite being supposed to only affect emitting, the jsx setting is required to import JSX and internally considered to be JSX files, or you get an error. This adds jsx: 'preserve', the safest setting to our base preset.

This shouldn't affect anything, for two reasons:

  • We don't use TypeScript to emit JSX code
  • Using astro add JSX_FRAMEWORK already changes the tsconfig.json to something else for frameworks that need it (most of which are in fact, using preserve already)

Fix withastro/language-tools#787

Testing

Tests should pass!

Docs

N/A

Copy link

changeset-bot bot commented Mar 8, 2024

🦋 Changeset detected

Latest commit: e45cf28

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 8, 2024
@ematipico ematipico merged commit 78bafc5 into main Mar 8, 2024
13 checks passed
@ematipico ematipico deleted the fix/jsx-preserve branch March 8, 2024 13:45
@astrobot-houston astrobot-houston mentioned this pull request Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: Module './Icon.astro' was resolved to '<path_to_component>/Icon.astro', but '--jsx' is not set.
4 participants