From 1ee6c839c7e59b53a6a73efe27d9a2f894ad4996 Mon Sep 17 00:00:00 2001 From: troy351 <914053923@qq.com> Date: Thu, 12 Aug 2021 13:07:29 +0800 Subject: [PATCH] feat: add allowDeclareFields for babel ts option --- src/jsxTransform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsxTransform.ts b/src/jsxTransform.ts index 4297b68..0239dc0 100644 --- a/src/jsxTransform.ts +++ b/src/jsxTransform.ts @@ -16,7 +16,7 @@ export function transformVueJsx( if (/\.tsx$/.test(id)) { plugins.unshift([ require.resolve('@babel/plugin-transform-typescript'), - { isTSX: true, allowExtensions: true }, + { isTSX: true, allowExtensions: true, allowDeclareFields: true }, ]) }