mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-19 16:43:34 -04:00
!640 修复srcEntrance不支持绝对路径问题
Merge pull request !640 from laibo102/srcEntrance
This commit is contained in:
@@ -197,6 +197,9 @@ function setStageTestRunnerFile(projectConfig) {
|
||||
function setAbilityFile(projectConfig, abilityPages) {
|
||||
abilityPages.forEach(abilityPath => {
|
||||
const projectAbilityPath = path.resolve(projectConfig.projectPath, '../', abilityPath);
|
||||
if (path.isAbsolute(abilityPath)) {
|
||||
abilityPath = '.' + abilityPath.slice(projectConfig.projectPath.length);
|
||||
}
|
||||
const entryPageKey = abilityPath.replace(/^\.\/ets\//, './').replace(/\.ts$/, '');
|
||||
if (fs.existsSync(projectAbilityPath)) {
|
||||
abilityConfig.projectAbilityPath.push(projectAbilityPath);
|
||||
|
||||
Reference in New Issue
Block a user