Skip to content

Commit 3ad33f9

Browse files
fix: add jsx-dev-runtime as an alias for jsx-runtime (#14631)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
1 parent eb8aa77 commit 3ad33f9

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

.changeset/tender-parts-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Adds the `astro/jsx-dev-runtime` export as an alias for `astro/jsx-runtime`

packages/astro/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
"types": "./jsx-runtime.d.ts",
4242
"default": "./dist/jsx-runtime/index.js"
4343
},
44+
"./jsx-dev-runtime": {
45+
"types": "./jsx-runtime.d.ts",
46+
"default": "./dist/jsx-runtime/index.js"
47+
},
4448
"./compiler-runtime": "./dist/runtime/compiler/index.js",
4549
"./runtime/*": "./dist/runtime/*",
4650
"./config": "./dist/config/entrypoint.js",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import assert from 'node:assert/strict';
2+
import { describe, it } from 'node:test';
3+
4+
describe('Import astro jsx runtime', async () => {
5+
it('Successfully imports astro/jsx-runtime', async () => {
6+
try {
7+
await import('astro/jsx-runtime');
8+
assert.equal(true, true);
9+
} catch (err) {
10+
assert.fail(undefined, undefined, `Importing astro/jsx-runtime should not throw an error: ${err}`);
11+
}
12+
});
13+
14+
it('Successfully imports astro/jsx-dev-runtime', async () => {
15+
try {
16+
await import('astro/jsx-dev-runtime');
17+
assert.equal(true, true);
18+
} catch (err) {
19+
assert.fail(undefined, undefined, `Importing astro/jsx-dev-runtime should not throw an error: ${err}`);
20+
}
21+
});
22+
});

0 commit comments

Comments
 (0)