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

Commit

Permalink
ensure sfx externals have deterministic ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Mar 5, 2016
1 parent da444c9 commit 08f69b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function compileTree(loader, tree, traceOpts, compileOpts, outputOpts, cache) {

// static bundle wraps with a self-executing loader
if (compileOpts.static)
return wrapSFXOutputs(loader, tree, outputs, entryPoints, compileOpts, cache);
return wrapSFXOutputs(loader, tree, modules, outputs, entryPoints, compileOpts, cache);

return outputs;
})
Expand All @@ -320,7 +320,7 @@ function compileTree(loader, tree, traceOpts, compileOpts, outputOpts, cache) {
}

exports.wrapSFXOutputs = wrapSFXOutputs;
function wrapSFXOutputs(loader, tree, outputs, entryPoints, compileOpts, cache) {
function wrapSFXOutputs(loader, tree, modules, outputs, entryPoints, compileOpts, cache) {
var compilers = {};

// NB deprecate
Expand All @@ -333,13 +333,13 @@ function wrapSFXOutputs(loader, tree, outputs, entryPoints, compileOpts, cache)
// NB the next optimization step is to do no wrapping for the single module cases
var allRegister = true;

var modules = Object.keys(tree).filter(function(module) {
Object.keys(tree).forEach(function(module) {
if (tree[module] === false && !loader.has(module))
externalDeps.push(module);

return tree[module] && !tree[module].conditional;
});

externalDeps.sort();

// determine compilers used
var legacyTranspiler = false;
modules.forEach(function(name) {
Expand Down

0 comments on commit 08f69b9

Please sign in to comment.