Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
ensure returned output.modules is ordered
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Apr 4, 2016
1 parent 8bac50b commit 6416371
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,7 @@ Builder.prototype.bundle = function(expressionOrTree, outFile, opts) {
.then(function(compiled) {
return writeOutputs(compiled.outputs, self.loader.baseURL, outputOpts)
.then(function(output) {
output.modules = Object.keys(tree).filter(function(moduleName) {
return tree[moduleName] && !tree[moduleName].conditional;
});
output.modules = compiled.modules;
output.entryPoints = compiled.entryPoints;
output.tree = tree;
output.assetList = compiled.assetList;
Expand Down Expand Up @@ -662,9 +660,7 @@ Builder.prototype.buildStatic = function(expressionOrTree, outFile, opts) {
if (inlineMap)
output.inlineMap = inlineMap;
output.assetList = compiled.assetList;
output.modules = Object.keys(tree).filter(function(moduleName) {
return tree[moduleName] && !tree[moduleName].conditional;
});
output.modules = compiled.modules;
output.tree = tree;
return output;
});
Expand Down
3 changes: 2 additions & 1 deletion lib/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ function compileTree(loader, tree, traceOpts, compileOpts, outputOpts, cache) {
return {
outputs: outputs,
entryPoints: entryPoints,
assetList: assetList
assetList: assetList,
modules: modules.reverse()
};
});
}
Expand Down

0 comments on commit 6416371

Please sign in to comment.