mirror of
				https://github.com/vuejs/babel-plugin-jsx.git
				synced 2025-10-31 17:32:32 +08:00 
			
		
		
		
	chore(deps): update dependency html-tags to v4 (#708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
		| @@ -32,7 +32,7 @@ | ||||
|     "@vue/babel-helper-vue-transform-on": "workspace:*", | ||||
|     "@vue/babel-plugin-resolve-type": "workspace:*", | ||||
|     "camelcase": "^6.3.0", | ||||
|     "html-tags": "^3.3.1", | ||||
|     "html-tags": "^4.0.0", | ||||
|     "svg-tags": "^1.0.0" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import * as t from '@babel/types'; | ||||
| import htmlTags from 'html-tags'; | ||||
| import htmlTags, { type HtmlTags } from 'html-tags'; | ||||
| import svgTags from 'svg-tags'; | ||||
| import { type NodePath } from '@babel/traverse'; | ||||
| import type { State } from './interface'; | ||||
| @@ -60,7 +60,7 @@ export const checkIsComponent = ( | ||||
|   return ( | ||||
|     !state.opts.isCustomElement?.(tag) && | ||||
|     shouldTransformedToSlots(tag) && | ||||
|     !htmlTags.includes(tag as htmlTags.htmlTags) && | ||||
|     !htmlTags.includes(tag as HtmlTags) && | ||||
|     !svgTags.includes(tag) | ||||
|   ); | ||||
| }; | ||||
| @@ -99,10 +99,7 @@ export const getTag = ( | ||||
|   const namePath = path.get('openingElement').get('name'); | ||||
|   if (namePath.isJSXIdentifier()) { | ||||
|     const { name } = namePath.node; | ||||
|     if ( | ||||
|       !htmlTags.includes(name as htmlTags.htmlTags) && | ||||
|       !svgTags.includes(name) | ||||
|     ) { | ||||
|     if (!htmlTags.includes(name as HtmlTags) && !svgTags.includes(name)) { | ||||
|       return name === FRAGMENT | ||||
|         ? createIdentifier(state, FRAGMENT) | ||||
|         : path.scope.hasBinding(name) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user