File tree Expand file tree Collapse file tree
packages/babel-plugin-jsx Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 "@vue/babel-helper-vue-transform-on" : " workspace:*" ,
3333 "@vue/babel-plugin-resolve-type" : " workspace:*" ,
3434 "camelcase" : " ^6.3.0" ,
35- "html-tags" : " ^3.3.1 " ,
35+ "html-tags" : " ^4.0.0 " ,
3636 "svg-tags" : " ^1.0.0"
3737 },
3838 "devDependencies" : {
Original file line number Diff line number Diff line change 11import * as t from '@babel/types' ;
2- import htmlTags from 'html-tags' ;
2+ import htmlTags , { type HtmlTags } from 'html-tags' ;
33import svgTags from 'svg-tags' ;
44import { type NodePath } from '@babel/traverse' ;
55import type { State } from './interface' ;
@@ -60,7 +60,7 @@ export const checkIsComponent = (
6060 return (
6161 ! state . opts . isCustomElement ?.( tag ) &&
6262 shouldTransformedToSlots ( tag ) &&
63- ! htmlTags . includes ( tag as htmlTags . htmlTags ) &&
63+ ! htmlTags . includes ( tag as HtmlTags ) &&
6464 ! svgTags . includes ( tag )
6565 ) ;
6666} ;
@@ -99,10 +99,7 @@ export const getTag = (
9999 const namePath = path . get ( 'openingElement' ) . get ( 'name' ) ;
100100 if ( namePath . isJSXIdentifier ( ) ) {
101101 const { name } = namePath . node ;
102- if (
103- ! htmlTags . includes ( name as htmlTags . htmlTags ) &&
104- ! svgTags . includes ( name )
105- ) {
102+ if ( ! htmlTags . includes ( name as HtmlTags ) && ! svgTags . includes ( name ) ) {
106103 return name === FRAGMENT
107104 ? createIdentifier ( state , FRAGMENT )
108105 : path . scope . hasBinding ( name )
You can’t perform that action at this time.
0 commit comments