mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-10 18:03:01 +00:00
fix(code-generator): upgrade prettier parser from babel to babel-ts, fix some ts parse error (#2166)
This commit is contained in:
parent
343954009e
commit
3a21709e58
@ -21,7 +21,7 @@ const factory: PostProcessorFactory<ProcessorConfig> = (config?: ProcessorConfig
|
||||
const codePrettier: PostProcessor = (content: string, fileType: string) => {
|
||||
let parser: prettier.BuiltInParserName | any;
|
||||
if (fileType === 'js' || fileType === 'jsx' || fileType === 'ts' || fileType === 'tsx') {
|
||||
parser = 'babel';
|
||||
parser = 'babel-ts';
|
||||
} else if (fileType === 'json') {
|
||||
parser = 'json-stringify';
|
||||
} else if (PARSERS.indexOf(fileType) >= 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user