Skip to content

Commit

Permalink
refactor(plugin-vue-jsx): use options interface of `@vue/babel-plugin…
Browse files Browse the repository at this point in the history
…-jsx` (#1454)
  • Loading branch information
Amour1688 committed Jan 9, 2021
1 parent 7d7e479 commit 40990a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions packages/plugin-vue-jsx/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { Plugin } from 'vite'
import { VueJSXPluginOptions } from '@vue/babel-plugin-jsx'

// https://github.com/vuejs/jsx-next/tree/dev/packages/babel-plugin-jsx#options
export interface Options {
transformOn?: boolean
optimize?: boolean
isCustomElement?: (tag: string) => boolean
mergeProps?: boolean
}

declare function createPlugin(options?: Options): Plugin
declare function createPlugin(options?: VueJSXPluginOptions): Plugin

export default createPlugin
2 changes: 1 addition & 1 deletion packages/plugin-vue-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@babel/core": "^7.12.10",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-typescript": "^7.12.1",
"@vue/babel-plugin-jsx": "^1.0.0",
"@vue/babel-plugin-jsx": "^1.0.1",
"hash-sum": "^2.0.0"
}
}

0 comments on commit 40990a6

Please sign in to comment.