From 1e0bc85b8f2c23848c0bca51864f4ee4540481c3 Mon Sep 17 00:00:00 2001 From: Jiahui-Yan <73054673+Jiahui-Yan@users.noreply.github.com> Date: Wed, 19 Apr 2023 11:55:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20babalPluginsAfterTsTra?= =?UTF-8?q?nsform=20=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-vue-jsx/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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[] } From 596f460d976e0a91802ac8dcc182adc9d1b534f5 Mon Sep 17 00:00:00 2001 From: Jiahui-Yan <73054673+Jiahui-Yan@users.noreply.github.com> Date: Wed, 19 Apr 2023 11:58:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=AF=B9=20baba?= =?UTF-8?q?lPluginsAfterTsTransform=20=E9=80=89=E9=A1=B9=E7=9A=84=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-vue-jsx/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {