diff --git a/react-packager/src/JSTransformer/index.js b/react-packager/src/JSTransformer/index.js index 7c20e10e..0cc7f2c6 100644 --- a/react-packager/src/JSTransformer/index.js +++ b/react-packager/src/JSTransformer/index.js @@ -121,7 +121,9 @@ Transformer.prototype.loadFileAndTransform = function(filePath) { }); }; -function TransformError() {} +function TransformError() { + Error.captureStackTrace && Error.captureStackTrace(this, TransformError); +} util.inherits(TransformError, SyntaxError); function formatError(err, filename, source) {