diff --git a/packages/plugin-vue-jsx/src/index.ts b/packages/plugin-vue-jsx/src/index.ts index a1e74d2a..93fb5bec 100644 --- a/packages/plugin-vue-jsx/src/index.ts +++ b/packages/plugin-vue-jsx/src/index.ts @@ -38,7 +38,7 @@ function vueJsxPlugin(options: Options = {}): Plugin { let needHmr = false let needSourceMap = true - const { include, exclude, babelPlugins = [], ...babelPluginOptions } = options + const { include, exclude, babelPlugins = [], babalPluginsAfterTsTransform = [], ...babelPluginOptions } = options const filter = createFilter(include || /\.[jt]sx$/, exclude) return { @@ -93,6 +93,7 @@ function vueJsxPlugin(options: Options = {}): Plugin { // @ts-ignore { isTSX: true, allowExtensions: true }, ]) + plugins.push(...babalPluginsAfterTsTransform) } if (!ssr && !needHmr) { diff --git a/packages/plugin-vue-jsx/src/types.ts b/packages/plugin-vue-jsx/src/types.ts index a3be5808..1f726e23 100644 --- a/packages/plugin-vue-jsx/src/types.ts +++ b/packages/plugin-vue-jsx/src/types.ts @@ -7,4 +7,4 @@ export interface FilterOptions { } export type Options = VueJSXPluginOptions & - FilterOptions & { babelPlugins?: any[] } + FilterOptions & { babelPlugins?: any[], babalPluginsAfterTsTransform?: any[] }