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

Commit

Permalink
fix sfx core regression
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Oct 16, 2017
1 parent 19b73d4 commit 0171134
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions templates/sfx-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,24 @@
});
var require = makeDynamicRequire(link.deps, link.depLoads, seen);

if (module.exports !== moduleObj.__useDefault)
// evaluate deps first
if (!link.executingRequire)
for (var i = 0; i < link.deps.length; i++)
require(link.deps[i]);

var output = link.execute.call(global, require, moduleObj.__useDefault, module);
if (output !== undefined)
moduleObj.default = moduleObj.__useDefault = output;
else if (module.exports !== moduleObj.__useDefault)
moduleObj.default = moduleObj.__useDefault = module.exports;

var moduleDefault = moduleObj.default;
var moduleDefault = moduleObj.__useDefault;

// __esModule flag extension support
if (moduleDefault && moduleDefault.__esModule) {
if (moduleDefault && moduleDefault.__esModule)
for (var p in moduleDefault)
if (Object.hasOwnProperty.call(moduleDefault, p))
moduleObj[p] = moduleDefault[p];
}

}

var module = load.module = new Module(link.moduleObj);
Expand Down
2 changes: 1 addition & 1 deletion templates/sfx-core.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0171134

Please sign in to comment.