Skip to content

Commit

Permalink
fix(cli): fixed component init event missing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Oct 2, 2018
1 parent 0b52389 commit 67474ca
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/cli/core/plugins/parser/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ exports = module.exports = function () {
let components = {};
let sfcConfig = ctx.sfc.config;

if (sfcConfig && sfcConfig.parsed.usingComponents) {
let usingComponents = sfcConfig.parsed.usingComponents;
for (let k in usingComponents) {
components[k] = {
path: usingComponents[k]
};
}
let usingComponents = sfcConfig && sfcConfig.parsed.output ? sfcConfig.parsed.output.usingComponents : {};

for (let k in usingComponents) {
components[k] = {
path: usingComponents[k]
};
}

return this.hookUnique('template-parse', node.content, components, ctx).then(rst => {
Expand Down

0 comments on commit 67474ca

Please sign in to comment.