File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
packages/babel-plugin-jsx Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 32
32
"@vue/babel-helper-vue-transform-on" : " workspace:*" ,
33
33
"@vue/babel-plugin-resolve-type" : " workspace:*" ,
34
34
"camelcase" : " ^6.3.0" ,
35
- "html-tags" : " ^3.3.1 " ,
35
+ "html-tags" : " ^4.0.0 " ,
36
36
"svg-tags" : " ^1.0.0"
37
37
},
38
38
"devDependencies" : {
Original file line number Diff line number Diff line change 1
1
import * as t from '@babel/types' ;
2
- import htmlTags from 'html-tags' ;
2
+ import htmlTags , { type HtmlTags } from 'html-tags' ;
3
3
import svgTags from 'svg-tags' ;
4
4
import { type NodePath } from '@babel/traverse' ;
5
5
import type { State } from './interface' ;
@@ -60,7 +60,7 @@ export const checkIsComponent = (
60
60
return (
61
61
! state . opts . isCustomElement ?.( tag ) &&
62
62
shouldTransformedToSlots ( tag ) &&
63
- ! htmlTags . includes ( tag as htmlTags . htmlTags ) &&
63
+ ! htmlTags . includes ( tag as HtmlTags ) &&
64
64
! svgTags . includes ( tag )
65
65
) ;
66
66
} ;
@@ -99,10 +99,7 @@ export const getTag = (
99
99
const namePath = path . get ( 'openingElement' ) . get ( 'name' ) ;
100
100
if ( namePath . isJSXIdentifier ( ) ) {
101
101
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 ) ) {
106
103
return name === FRAGMENT
107
104
? createIdentifier ( state , FRAGMENT )
108
105
: path . scope . hasBinding ( name )
You can’t perform that action at this time.
0 commit comments