From 75a4a80935ea69cff8c179a08119bbad833d3988 Mon Sep 17 00:00:00 2001 From: AprChell Date: Mon, 29 May 2023 14:11:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(code-gen):=20=E5=87=BA=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=9A=84*.ts=E5=92=8C*.tsx=E6=96=87=E4=BB=B6=E4=BD=BF?= =?UTF-8?q?=E7=94=A8babel=E6=A0=BC=E5=BC=8F=E5=8C=96=20(#2088)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/code-generator/src/postprocessor/prettier/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/code-generator/src/postprocessor/prettier/index.ts b/modules/code-generator/src/postprocessor/prettier/index.ts index b4c3188f3..075fc66e7 100644 --- a/modules/code-generator/src/postprocessor/prettier/index.ts +++ b/modules/code-generator/src/postprocessor/prettier/index.ts @@ -20,7 +20,7 @@ const factory: PostProcessorFactory = (config?: ProcessorConfig const codePrettier: PostProcessor = (content: string, fileType: string) => { let parser: prettier.BuiltInParserName | any; - if (fileType === 'js' || fileType === 'jsx') { + if (fileType === 'js' || fileType === 'jsx' || fileType === 'ts' || fileType === 'tsx') { parser = 'babel'; } else if (fileType === 'json') { parser = 'json-stringify';