Skip to content

Commit d03d23c

Browse files
committed
fix(cli): 调整 taro-page 插入逻辑,close #4357
1 parent 6caf2de commit d03d23c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/taro-cli/src/mini/astProcess.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,6 @@ export function parseAst (
461461
}
462462
})
463463
}
464-
if (type === PARSE_AST_TYPE.PAGE) {
465-
taroSelfComponents.add('taro-page')
466-
}
467464
astPath.remove()
468465
} else {
469466
let isDepComponent = false
@@ -976,6 +973,11 @@ export function parseAst (
976973
}
977974
}
978975
})
976+
977+
if (isQuickApp && type === PARSE_AST_TYPE.PAGE) {
978+
taroSelfComponents.add('taro-page')
979+
}
980+
979981
return {
980982
code: generate(ast).code,
981983
styleFiles,

0 commit comments

Comments
 (0)