diff --git a/packages/plugin-vue-jsx/src/index.ts b/packages/plugin-vue-jsx/src/index.ts index 79a2976c..d291472c 100644 --- a/packages/plugin-vue-jsx/src/index.ts +++ b/packages/plugin-vue-jsx/src/index.ts @@ -44,6 +44,7 @@ function vueJsxPlugin(options: Options = {}): Plugin { exclude, babelPlugins = [], defineComponentName = ['defineComponent'], + tsPluginOptions = {}, ...babelPluginOptions } = options const filter = createFilter(include || /\.[jt]sx$/, exclude) @@ -100,7 +101,7 @@ function vueJsxPlugin(options: Options = {}): Plugin { (r) => r.default, ), // @ts-ignore - { isTSX: true, allowExtensions: true }, + { ...tsPluginOptions, isTSX: true, allowExtensions: true }, ]) } diff --git a/packages/plugin-vue-jsx/src/types.ts b/packages/plugin-vue-jsx/src/types.ts index 3c174fdf..0b9f4783 100644 --- a/packages/plugin-vue-jsx/src/types.ts +++ b/packages/plugin-vue-jsx/src/types.ts @@ -10,4 +10,5 @@ export interface Options extends VueJSXPluginOptions, FilterOptions { babelPlugins?: any[] /** @default ['defineComponent'] */ defineComponentName?: string[] + tsPluginOptions?: any }