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

Allow automatic JSX runtime alongside MDX #4160

Closed
wants to merge 4 commits into from
Closed

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Aug 4, 2022

Changes

  • Instead of using the automatic runtime to append Astro JSX, this makes it so that we use the pragma comment /** @jsxImportSource astro */ to make our Astro JSX (MDX) files get the right jsx runtime import.
  • This means that you can rely on the automatic imports for other renderers, like React.
  • Fixes 🐛 BUG: React + MDX: React is not defined #4084

Testing

  • Test added
  • Other tests still passing

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Aug 4, 2022

🦋 Changeset detected

Latest commit: 258aac0

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

This PR includes changesets to release 13 packages
Name Type
astro Patch
@astrojs/mdx Patch
@e2e/astro-component Patch
@e2e/error-react-spectrum Patch
@e2e/error-sass Patch
@e2e/errors Patch
@e2e/lit-component Patch
@e2e/preact-component Patch
@e2e/react-component Patch
@e2e/solid-component Patch
@e2e/svelte-component Patch
@e2e/e2e-tailwindcss Patch
@e2e/ts-resolution Patch

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 pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) labels Aug 4, 2022
@github-actions github-actions bot added the pkg: react Related to React (scope) label Aug 4, 2022
@matthewp
Copy link
Contributor Author

matthewp commented Aug 4, 2022

Closing for now as #4137 might fix this a better way.

@matthewp matthewp closed this Aug 4, 2022
@bluwy bluwy deleted the mdx-plus-react-test branch October 8, 2024 06:02
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) pkg: integration Related to any renderer integration (scope) pkg: react Related to React (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: React + MDX: React is not defined
1 participant