Skip to content

Commit

Permalink
fix(cli): fixed compile sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Jun 6, 2019
1 parent 033ea98 commit b4e600b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/cli/core/plugins/parser/wpy.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ exports = module.exports = function () {
context.useCache = true;
sfc = context.sfc;

flow = Promise.resolve(true);
if (context.done) {
flow = Promise.resolve(true); // For file watch, still need to go throught all the dependences
} else {
flow = context.promise;
}
} else {
this.compiled[file] = context;
context.useCache = false;
Expand Down Expand Up @@ -66,7 +70,7 @@ exports = module.exports = function () {
this.involved[file] = 1;


return flow.then(() => {
context.promise = flow.then(() => {
return this.applyCompiler(context.sfc.config, context);
}).then(() => {
if (sfc.wxs) {
Expand All @@ -93,8 +97,11 @@ exports = module.exports = function () {
}));
}
}).then((all = []) => {
context.done = true;
return context;
});

return context.promise;
});


Expand Down

0 comments on commit b4e600b

Please sign in to comment.