Skip to content

Commit

Permalink
fix(cli): 调整 taro-page 插入逻辑,close #4357
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Sep 2, 2019
1 parent 6caf2de commit d03d23c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/taro-cli/src/mini/astProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,6 @@ export function parseAst (
}
})
}
if (type === PARSE_AST_TYPE.PAGE) {
taroSelfComponents.add('taro-page')
}
astPath.remove()
} else {
let isDepComponent = false
Expand Down Expand Up @@ -976,6 +973,11 @@ export function parseAst (
}
}
})

if (isQuickApp && type === PARSE_AST_TYPE.PAGE) {
taroSelfComponents.add('taro-page')
}

return {
code: generate(ast).code,
styleFiles,
Expand Down

0 comments on commit d03d23c

Please sign in to comment.