diff --git a/packager/react-packager/src/Server/index.js b/packager/react-packager/src/Server/index.js index 74e839272..4fd0be570 100644 --- a/packager/react-packager/src/Server/index.js +++ b/packager/react-packager/src/Server/index.js @@ -361,9 +361,14 @@ class Server { res.end(bundleSource); Activity.endEvent(startReqEventId); } else if (requestType === 'map') { - var sourceMap = JSON.stringify(p.getSourceMap({ + var sourceMap = p.getSourceMap({ minify: options.minify, - })); + }); + + if (typeof sourceMap !== 'string') { + sourceMap = JSON.stringify(sourceMap); + } + res.setHeader('Content-Type', 'application/json'); res.end(sourceMap); Activity.endEvent(startReqEventId);