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

Commit

Permalink
allow late build opt-outg
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jul 8, 2016
1 parent a362009 commit 82b7f0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ Trace.prototype.getLoadRecord = function(canonical, traceOpts, parentStack) {
return loader.instantiate({ name: normalized, metadata: load.metadata, address: address, source: source });
})
.then(function(result) {

// allow late build opt-out
if (load.metadata.build === false)
return false;

curHook = '';
if (!result)
throw new TypeError('Native ES Module builds not supported. Ensure transpilation is included in the loader pipeline.');
Expand Down

0 comments on commit 82b7f0f

Please sign in to comment.