mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-10 18:03:01 +00:00
feat(code-gen): 出码生成的*.ts和*.tsx文件使用babel格式化 (#2088)
This commit is contained in:
parent
503793fdfc
commit
75a4a80935
@ -20,7 +20,7 @@ const factory: PostProcessorFactory<ProcessorConfig> = (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';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user