From b77fac4a9b88d11868b31b8a119957fe9d6ef44f Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Mon, 18 Oct 2021 19:38:02 +0800 Subject: [PATCH] houhaoyu@huawei.com Signed-off-by: houhaoyu Change-Id: Ifd490eba5797e7731950b5b76282f32bb61349ca --- compiler/src/process_import.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/src/process_import.ts b/compiler/src/process_import.ts index f475da2b5..d0d950db9 100644 --- a/compiler/src/process_import.ts +++ b/compiler/src/process_import.ts @@ -32,7 +32,6 @@ import { linkCollection, componentCollection, preprocessExtend, - preprocessNewExtend, processSystemApi, propCollection, isObservedClass, @@ -85,11 +84,11 @@ export default function processImport(node: ts.ImportDeclaration | ts.ImportEqua fileResolvePath = getFileResolvePath(fileResolvePath, pagesDir, filePath); } if (fs.existsSync(fileResolvePath) && fs.statSync(fileResolvePath).isFile()) { - const content: string = preprocessNewExtend(preprocessExtend(processSystemApi( + const content: string = preprocessExtend(processSystemApi( fs.readFileSync(fileResolvePath, { encoding: 'utf-8' }).replace( new RegExp('\\b' + STRUCT + '\\b.+\\{', 'g'), item => { return item.replace(new RegExp('\\b' + STRUCT + '\\b', 'g'), `${CLASS} `); - })))); + })), fileResolvePath, log); const sourceFile: ts.SourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS); visitAllNode(sourceFile, defaultName, asName, pagesDir, log); -- Gitee