@@ -137,7 +137,7 @@ function forEachHikeElementMoveChildrenToHikeProp(root: any, jsxOn: boolean) {
137137 visit ( root , ( node : any ) => {
138138 if ( isElementWithHikeAttribute ( node , jsxOn ) ) {
139139 if ( jsxOn ) {
140- moveChildrenToHikePropJSX ( node , jsxOn )
140+ moveChildrenToHikePropJSX ( node )
141141 } else {
142142 moveChildrenToHikeProp ( node )
143143 }
@@ -157,7 +157,7 @@ function isElementWithHikeAttribute(node: any, jsxOn: boolean) {
157157 )
158158}
159159
160- function moveChildrenToHikePropJSX ( node : any , jsxOn : boolean ) {
160+ function moveChildrenToHikePropJSX ( node : any ) {
161161 // dictionary of children by path
162162 const childrenByPath : any = { }
163163 node . children . forEach ( ( slot : any ) => {
@@ -252,8 +252,8 @@ function moveChildrenToHikeProp(node: any) {
252252 ( p : any ) => p . key . name !== "children" ,
253253 )
254254
255- // jsxs calls can only have arrays as children, so we turn any jsxs without array into jsx call
256255 visit ( node , function ( node : any ) {
256+ // jsxs calls can only have arrays as children, so we turn any jsxs without array into jsx call
257257 if ( node . type === "CallExpression" && node . callee . name === "_jsxs" ) {
258258 const childrenProp = node . arguments [ 1 ] . properties . find (
259259 ( p : any ) => p . key . value === "children" ,
@@ -262,6 +262,16 @@ function moveChildrenToHikeProp(node: any) {
262262 node . callee . name = "_jsx"
263263 }
264264 }
265+
266+ // same, but in dev mode the name is _jsxDEV, and we should change the `isStaticChildren` argument
267+ if ( node . type === "CallExpression" && node . callee . name === "_jsxDEV" ) {
268+ const childrenProp = node . arguments [ 1 ] . properties . find (
269+ ( p : any ) => p . key . value === "children" ,
270+ )
271+ if ( childrenProp && childrenProp . value . type !== "ArrayExpression" ) {
272+ node . arguments [ 3 ] = { type : "Literal" , value : false }
273+ }
274+ }
265275 } )
266276}
267277
0 commit comments