diff --git a/compiler/src/process_system_module.ts b/compiler/src/process_system_module.ts index 89745d7..505bfdd 100644 --- a/compiler/src/process_system_module.ts +++ b/compiler/src/process_system_module.ts @@ -16,5 +16,5 @@ import { processSystemApi } from './validate_ui_syntax'; module.exports = function processSystemModule(source: string): string { - return processSystemApi(source, false, this.resourcePath); + return processSystemApi(source, false, this.resourcePath, true); }; diff --git a/compiler/src/validate_ui_syntax.ts b/compiler/src/validate_ui_syntax.ts index fc601aa..7d06061 100644 --- a/compiler/src/validate_ui_syntax.ts +++ b/compiler/src/validate_ui_syntax.ts @@ -735,7 +735,8 @@ export function preprocessExtend(content: string, extendCollection?: Set }); } -export function processSystemApi(content: string, isProcessWhiteList: boolean = false, sourcePath?: string): string { +export function processSystemApi(content: string, isProcessWhiteList: boolean = false, + sourcePath: string = null, isSystemModule: boolean = false): string { let REG_SYSTEM: RegExp; if (isProcessWhiteList) { REG_SYSTEM = @@ -761,7 +762,7 @@ export function processSystemApi(content: string, isProcessWhiteList: boolean = if (!VALIDATE_MODULE.includes(systemValue)){ importModuleCollection.add(systemValue); } - if (!isProcessWhiteList && validateWhiteListModule(moduleType, systemKey)) { + if (!isProcessWhiteList && validateWhiteListModule(moduleType, systemKey) && !isSystemModule) { return item; } else if (isProcessWhiteList) { systemValue = item2;