Skip to content

Commit

Permalink
refactor(vue-jsx): remove extraneous import
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Aug 14, 2024
1 parent 7c2e023 commit ab2516a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/plugin-vue-jsx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import jsx from '@vue/babel-plugin-jsx'
import { createFilter, normalizePath } from 'vite'
import type { ComponentOptions } from 'vue'
import type { Plugin } from 'vite'
// eslint-disable-next-line n/no-extraneous-import
import type { CallExpression, Identifier } from '@babel/types'
import type { Options } from './types'

export * from './types'
Expand Down Expand Up @@ -108,11 +106,11 @@ function vueJsxPlugin(options: Options = {}): Plugin {
return {
visitor: {
CallExpression: {
enter(_path: babel.NodePath<CallExpression>) {
enter(_path: babel.NodePath<types.CallExpression>) {
if (
isDefineComponentCall(_path.node, defineComponentName)
) {
const callee = _path.node.callee as Identifier
const callee = _path.node.callee as types.Identifier
callee.name = `/* @__PURE__ */ ${callee.name}`
}
},
Expand Down

0 comments on commit ab2516a

Please sign in to comment.