diff --git a/lib/trace.js b/lib/trace.js index 2e56ea6..14f319a 100644 --- a/lib/trace.js +++ b/lib/trace.js @@ -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.');