Skip to content

Commit 40990a6

Browse files
authored
refactor(plugin-vue-jsx): use options interface of @vue/babel-plugin-jsx (#1454)
1 parent 7d7e479 commit 40990a6

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

packages/plugin-vue-jsx/index.d.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
import { Plugin } from 'vite'
2+
import { VueJSXPluginOptions } from '@vue/babel-plugin-jsx'
23

3-
// https://github.com/vuejs/jsx-next/tree/dev/packages/babel-plugin-jsx#options
4-
export interface Options {
5-
transformOn?: boolean
6-
optimize?: boolean
7-
isCustomElement?: (tag: string) => boolean
8-
mergeProps?: boolean
9-
}
10-
11-
declare function createPlugin(options?: Options): Plugin
4+
declare function createPlugin(options?: VueJSXPluginOptions): Plugin
125

136
export default createPlugin

packages/plugin-vue-jsx/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@babel/core": "^7.12.10",
2828
"@babel/plugin-syntax-import-meta": "^7.10.4",
2929
"@babel/plugin-transform-typescript": "^7.12.1",
30-
"@vue/babel-plugin-jsx": "^1.0.0",
30+
"@vue/babel-plugin-jsx": "^1.0.1",
3131
"hash-sum": "^2.0.0"
3232
}
3333
}

0 commit comments

Comments
 (0)