Skip to content

Commit

Permalink
feat(taro-mini-runner): 如果是组件需要补充 component:true 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Dec 26, 2019
1 parent 970a494 commit 2322c01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/taro-mini-runner/src/plugins/MiniPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,10 @@ export default class MiniPlugin {
adapter: buildAdapter
})
const { configObj } = this.parseAst(transformResult.ast, buildAdapter)
const isComponentConfig = isRoot ? {} : { component: true }
taroFileTypeMap[file.path] = {
type: isRoot ? PARSE_AST_TYPE.PAGE : PARSE_AST_TYPE.COMPONENT,
config: merge({}, buildUsingComponents(file.path, {}, transformResult.components),configObj),
config: merge({}, isComponentConfig, buildUsingComponents(file.path, {}, transformResult.components),configObj),
template: transformResult.template,
code: transformResult.code
}
Expand Down

0 comments on commit 2322c01

Please sign in to comment.