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

Cleanup unused JSX code #11741

Merged
merged 8 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/many-garlics-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'astro': major
---

Removes internal JSX handling as they are now handled by `@astrojs/mdx` directly. The below exports are also now removed:
bluwy marked this conversation as resolved.
Show resolved Hide resolved

- `astro/jsx/babel.js`
- `astro/jsx/component.js`
- `astro/jsx/index.js`
- `astro/jsx/renderer.js`
- `astro/jsx/server.js`
- `astro/jsx/transform-options.js`

Make sure to upgrade `@astrojs/mdx` to latest so that it doesn't rely on these entrypoints.
bluwy marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions .changeset/perfect-fans-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/mdx': minor
---

Updates adapter server entrypoint to use `@astrojs/mdx/server.js`
bluwy marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"./astro-jsx": "./astro-jsx.d.ts",
"./tsconfigs/*.json": "./tsconfigs/*",
"./tsconfigs/*": "./tsconfigs/*.json",
"./jsx/*": "./dist/jsx/*",
"./jsx/rehype.js": "./dist/jsx/rehype.js",
"./jsx-runtime": {
"types": "./jsx-runtime.d.ts",
"default": "./dist/jsx-runtime/index.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The emitted file has content similar to:
```js
const renderers = [
Object.assign(
{ name: 'astro:jsx', serverEntrypoint: 'astro/jsx/server.js', jsxImportSource: 'astro' },
{ name: 'astro:framework', serverEntrypoint: '@astrojs/framework/server.js' },
{ ssr: server_default },
),
];
Expand Down
2 changes: 0 additions & 2 deletions packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import htmlVitePlugin from '../vite-plugin-html/index.js';
import astroIntegrationsContainerPlugin from '../vite-plugin-integrations-container/index.js';
import astroLoadFallbackPlugin from '../vite-plugin-load-fallback/index.js';
import markdownVitePlugin from '../vite-plugin-markdown/index.js';
import mdxVitePlugin from '../vite-plugin-mdx/index.js';
import astroScannerPlugin from '../vite-plugin-scanner/index.js';
import astroScriptsPlugin from '../vite-plugin-scripts/index.js';
import astroScriptsPageSSRPlugin from '../vite-plugin-scripts/page-ssr.js';
Expand Down Expand Up @@ -136,7 +135,6 @@ export async function createVite(
astroEnv({ settings, mode, fs, sync }),
markdownVitePlugin({ settings, logger }),
htmlVitePlugin(),
mdxVitePlugin(),
astroPostprocessVitePlugin(),
astroIntegrationsContainerPlugin({ settings, logger }),
astroScriptsPageSSRPlugin({ settings }),
Expand Down
326 changes: 0 additions & 326 deletions packages/astro/src/jsx/babel.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/astro/src/jsx/component.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/astro/src/jsx/index.ts

This file was deleted.

Loading
Loading