File tree Expand file tree Collapse file tree 3 files changed +9
-24
lines changed
packages/babel-plugin-jsx Expand file tree Collapse file tree 3 files changed +9
-24
lines changed Original file line number Diff line number Diff line change 31
31
"@babel/types" : " ^7.26.9" ,
32
32
"@vue/babel-helper-vue-transform-on" : " workspace:*" ,
33
33
"@vue/babel-plugin-resolve-type" : " workspace:*" ,
34
- "html-tags" : " ^3.3.1" ,
35
- "svg-tags" : " ^1.0.0"
34
+ "@vue/shared" : " ^3.5.13"
36
35
},
37
36
"devDependencies" : {
38
37
"@babel/core" : " ^7.26.9" ,
39
38
"@babel/preset-env" : " ^7.26.9" ,
40
39
"@types/babel__template" : " ^7.4.4" ,
41
40
"@types/babel__traverse" : " ^7.20.6" ,
42
- "@types/svg-tags" : " ^1.0.2" ,
43
41
"@vue/test-utils" : " ^2.4.6" ,
44
42
"regenerator-runtime" : " ^0.14.1" ,
45
43
"vue" : " catalog:"
Original file line number Diff line number Diff line change 1
1
import * as t from '@babel/types' ;
2
- import htmlTags from 'html-tags' ;
3
- import svgTags from 'svg-tags' ;
4
2
import { type NodePath } from '@babel/traverse' ;
5
3
import type { State } from './interface' ;
6
4
import SlotFlags from './slotFlags' ;
7
-
5
+ import { isHTMLTag , isSVGTag } from '@vue/shared'
8
6
export const JSX_HELPER_KEY = 'JSX_HELPER_KEY' ;
9
7
export const FRAGMENT = 'Fragment' ;
10
8
export const KEEP_ALIVE = 'KeepAlive' ;
@@ -60,8 +58,8 @@ export const checkIsComponent = (
60
58
return (
61
59
! state . opts . isCustomElement ?.( tag ) &&
62
60
shouldTransformedToSlots ( tag ) &&
63
- ! htmlTags . includes ( tag as htmlTags . htmlTags ) &&
64
- ! svgTags . includes ( tag )
61
+ ! isHTMLTag ( tag ) &&
62
+ ! isSVGTag ( tag )
65
63
) ;
66
64
} ;
67
65
@@ -100,8 +98,8 @@ export const getTag = (
100
98
if ( namePath . isJSXIdentifier ( ) ) {
101
99
const { name } = namePath . node ;
102
100
if (
103
- ! htmlTags . includes ( name as htmlTags . htmlTags ) &&
104
- ! svgTags . includes ( name )
101
+ ! isHTMLTag ( name ) &&
102
+ ! isSVGTag ( name )
105
103
) {
106
104
return name === FRAGMENT
107
105
? createIdentifier ( state , FRAGMENT )
You can’t perform that action at this time.
0 commit comments