mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-19 16:43:34 -04:00
fix Signed-off-by: houhaoyu <houhaoyu@huawei.com> Change-Id: I2348eb458f7b910f4fb37d80e8918aa812ac6864
This commit is contained in:
@@ -234,8 +234,8 @@ export class ResultStates {
|
||||
comp.removedFiles = comp.removedFiles || [];
|
||||
const watchModifiedFiles: string[] = [...comp.modifiedFiles];
|
||||
const watchRemovedFiles: string[] = [...comp.removedFiles];
|
||||
if (comp.modifiedFiles) {
|
||||
const isTsAndEtsFile: boolean = [...comp.modifiedFiles].some((item: string) => {
|
||||
if (watchModifiedFiles.length) {
|
||||
const isTsAndEtsFile: boolean = watchModifiedFiles.some((item: string) => {
|
||||
return /.(ts|ets)$/.test(item);
|
||||
});
|
||||
if (!isTsAndEtsFile) {
|
||||
|
||||
@@ -121,7 +121,8 @@ const resolvedModulesCache: Map<string, ts.ResolvedModuleFull[]> = new Map();
|
||||
|
||||
function resolveModuleNames(moduleNames: string[], containingFile: string): ts.ResolvedModuleFull[] {
|
||||
const resolvedModules: ts.ResolvedModuleFull[] = [];
|
||||
if (![...shouldResolvedFiles].length || shouldResolvedFiles.has(path.resolve(containingFile))) {
|
||||
if (![...shouldResolvedFiles].length || shouldResolvedFiles.has(path.resolve(containingFile)) ||
|
||||
!resolvedModulesCache[path.resolve(containingFile)]) {
|
||||
for (const moduleName of moduleNames) {
|
||||
const result = ts.resolveModuleName(moduleName, containingFile, compilerOptions, {
|
||||
fileExists(fileName: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user