Skip to content

Commit ceea5f1

Browse files
committed
build: update paths for exports
1 parent ed2afc1 commit ceea5f1

File tree

8 files changed

+27
-29
lines changed

8 files changed

+27
-29
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '../dist/jsx-runtime/jsx-runtime.cjs'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '../src/jsx-runtime.ts'
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type * from '../src/jsx-runtime.js'
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '../dist/jsx-runtime/jsx-runtime.js'

packages/core/jsx-runtime/index.d.cts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '../src/jsx-runtime.ts'

packages/core/jsx-runtime/index.d.ts

-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
11
export type * from '../src/jsx-runtime.ts'
2-
3-
declare global {
4-
namespace JSX {
5-
// @ts-ignore - conflict with React typings
6-
type Element = [string, ...any[]]
7-
// @ts-ignore - conflict with React typings
8-
interface IntrinsicElements {
9-
// @ts-ignore - conflict with React typings
10-
[key: string]: any
11-
}
12-
}
13-
}

packages/core/package.json

+10-6
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,20 @@
2626
"require": "./dist/index.cjs"
2727
},
2828
"./jsx-runtime": {
29-
"types": "./jsx-runtime/index.d.ts",
30-
"browser": "./jsx-runtime/index.js",
29+
"types": {
30+
"import": "./jsx-runtime/index.d.ts",
31+
"require": "./jsx-runtime/index.d.cts"
32+
},
3133
"import": "./jsx-runtime/index.js",
3234
"require": "./jsx-runtime/index.cjs"
3335
},
3436
"./jsx-dev-runtime": {
35-
"types": "./jsx-runtime/index.d.ts",
36-
"browser": "./jsx-runtime/index.js",
37-
"import": "./jsx-runtime/index.js",
38-
"require": "./jsx-runtime/index.cjs"
37+
"types": {
38+
"import": "./jsx-dev-runtime/index.d.ts",
39+
"require": "./jsx-dev-runtime/index.d.cts"
40+
},
41+
"import": "./jsx-dev-runtime/index.js",
42+
"require": "./jsx-dev-runtime/index.cjs"
3943
}
4044
},
4145
"main": "dist/index.cjs",

packages/core/src/jsx-runtime.ts

+12-11
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ export type DOMOutputSpecArray =
1313
| [string, Attributes, DOMOutputSpecArray | 0]
1414
| [string, DOMOutputSpecArray]
1515

16-
// declare global {
17-
// // eslint-disable-next-line @typescript-eslint/no-namespace
18-
// namespace JSX {
19-
// // @ts-ignore - conflict with React typings
20-
// type Element = DOMOutputSpecArray | DOMOutputSpecElement
21-
// interface IntrinsicElements {
22-
// // @ts-ignore - conflict with React typings
23-
// [key: string]: any
24-
// }
25-
// }
26-
// }
16+
declare global {
17+
// eslint-disable-next-line @typescript-eslint/no-namespace
18+
namespace JSX {
19+
// @ts-ignore - conflict with React typings
20+
type Element = [string, ...any[]]
21+
// @ts-ignore - conflict with React typings
22+
interface IntrinsicElements {
23+
// @ts-ignore - conflict with React typings
24+
[key: string]: any
25+
}
26+
}
27+
}
2728

2829
export type JSXRenderer = (
2930
tag: 'slot' | string | ((props?: Attributes) => DOMOutputSpecArray | DOMOutputSpecElement),

0 commit comments

Comments
 (0)