mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 12:05:24 -04:00
support deccjsunit/index Signed-off-by: houhaoyu <houhaoyu@huawei.com> Change-Id: If20b8fb59438acdbbc1c4069a5e1d7af5136af28
This commit is contained in:
@@ -166,8 +166,12 @@ function resolveModuleNames(moduleNames: string[], containingFile: string): ts.R
|
||||
}
|
||||
} else {
|
||||
const modulePath: string = path.resolve(__dirname, '../../../api', moduleName + '.d.ts');
|
||||
const suffix: string = /\.js$/.test(moduleName) ? '' : '.js';
|
||||
const jsModulePath: string = path.resolve(__dirname, '../node_modules', moduleName + suffix);
|
||||
if (ts.sys.fileExists(modulePath)) {
|
||||
resolvedModules.push(getResolveModule(modulePath, '.d.ts'));
|
||||
} else if (ts.sys.fileExists(jsModulePath)) {
|
||||
resolvedModules.push(getResolveModule(modulePath, '.js'));
|
||||
} else {
|
||||
resolvedModules.push(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user