mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 20:15:24 -04:00
chengongping@huawei.com not collect module Signed-off-by: chengongping <chengongping@huawei.com> Change-Id: I33e8444864815036d667a3157cc3b8dbe135701d
This commit is contained in:
@@ -94,17 +94,19 @@ export class ResultStates {
|
||||
);
|
||||
|
||||
compilation.hooks.buildModule.tap('findModule', (module) => {
|
||||
if (module.context.indexOf(projectConfig.projectPath) >= 0) {
|
||||
return;
|
||||
}
|
||||
const modulePath: string = path.join(module.context);
|
||||
const srcIndex: number = modulePath.lastIndexOf(MODULE_ETS_PATH);
|
||||
if (srcIndex < 0) {
|
||||
return;
|
||||
}
|
||||
const moduleSharePath: string = path.resolve(modulePath.substring(0, srcIndex), MODULE_SHARE_PATH);
|
||||
if (fs.existsSync(moduleSharePath)) {
|
||||
this.moduleSharePaths.add(moduleSharePath);
|
||||
if (module.context) {
|
||||
if (module.context.indexOf(projectConfig.projectPath) >= 0) {
|
||||
return;
|
||||
}
|
||||
const modulePath: string = path.join(module.context);
|
||||
const srcIndex: number = modulePath.lastIndexOf(MODULE_ETS_PATH);
|
||||
if (srcIndex < 0) {
|
||||
return;
|
||||
}
|
||||
const moduleSharePath: string = path.resolve(modulePath.substring(0, srcIndex), MODULE_SHARE_PATH);
|
||||
if (fs.existsSync(moduleSharePath)) {
|
||||
this.moduleSharePaths.add(moduleSharePath);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user