Skip to content

Commit a7d41ed

Browse files
authored
Merge pull request #403 from RosApr/fix-jsx-runtime
fix jsx runtime bug
2 parents b7b559a + 05d20e5 commit a7d41ed

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

jsx-dev-runtime.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
export { h as jsx, h as jsxs, h as jsxDEV, Fragment } from "./dist/fre.js";
1+
import { h, Fragment } from './dist/fre.js'
2+
export { Fragment }
3+
export const jsx = function(type, props, key) {
4+
return h(type, {...props, key});
5+
}
6+
export const jsxs = function(type, props, key) {
7+
return h(type, {...props, key});
8+
}
9+
export const jsxDEV = function (type, props, key, isStatic, source, self) {
10+
return h(type, {...props, key});
11+
}

jsx-runtime.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
export { h as jsx, h as jsxs, Fragment } from "./dist/fre.js"
1+
import { h, Fragment } from './dist/fre.js'
2+
export { Fragment }
3+
export const jsx = function(type, props, key) {
4+
return h(type, {...props, key});
5+
}
6+
export const jsxs = function(type, props, key) {
7+
return h(type, {...props, key});
8+
}

0 commit comments

Comments
 (0)