mirror of https://github.com/vuejs/core.git
fix(jsx-runtime): fix automatic runtime implementation (#7959)
This commit is contained in:
parent
bcf5841dde
commit
5838950ecf
|
|
@ -1,4 +1,10 @@
|
||||||
const Vue = require('vue')
|
const { h, Fragment } = require('vue')
|
||||||
exports.jsx = Vue.h
|
|
||||||
exports.jsxDEV = Vue.h
|
function jsx(type, { children, ...props }) {
|
||||||
exports.Fragment = Vue.Fragment
|
return h(type, props, children)
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.jsx = jsx
|
||||||
|
exports.jsxs = jsx
|
||||||
|
exports.jsxDEV = jsx
|
||||||
|
exports.Fragment = Fragment
|
||||||
|
|
|
||||||
|
|
@ -1 +1,12 @@
|
||||||
export { h as jsx, h as jsxDEV, Fragment } from 'vue'
|
import { h, Fragment } from 'vue'
|
||||||
|
|
||||||
|
function jsx(type, { children, ...props }) {
|
||||||
|
return h(type, props, children)
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
Fragment,
|
||||||
|
jsx,
|
||||||
|
jsx as jsxs,
|
||||||
|
jsx as jsxDEV
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,11 @@
|
||||||
"import": "./jsx-runtime/index.mjs",
|
"import": "./jsx-runtime/index.mjs",
|
||||||
"require": "./jsx-runtime/index.js"
|
"require": "./jsx-runtime/index.js"
|
||||||
},
|
},
|
||||||
|
"./jsx-dev-runtime": {
|
||||||
|
"types": "./jsx-runtime/index.d.ts",
|
||||||
|
"import": "./jsx-runtime/index.mjs",
|
||||||
|
"require": "./jsx-runtime/index.js"
|
||||||
|
},
|
||||||
"./jsx": {
|
"./jsx": {
|
||||||
"types": "./jsx.d.ts"
|
"types": "./jsx.d.ts"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue