Fix minified source maps
Summary: @public The source maps generated by uglify are already stringified, and therefore were being stringified twice. Reviewed By: @martinbigio Differential Revision: D2498242
This commit is contained in:
parent
17c49e2879
commit
753cc7683c
|
@ -361,9 +361,14 @@ class Server {
|
||||||
res.end(bundleSource);
|
res.end(bundleSource);
|
||||||
Activity.endEvent(startReqEventId);
|
Activity.endEvent(startReqEventId);
|
||||||
} else if (requestType === 'map') {
|
} else if (requestType === 'map') {
|
||||||
var sourceMap = JSON.stringify(p.getSourceMap({
|
var sourceMap = p.getSourceMap({
|
||||||
minify: options.minify,
|
minify: options.minify,
|
||||||
}));
|
});
|
||||||
|
|
||||||
|
if (typeof sourceMap !== 'string') {
|
||||||
|
sourceMap = JSON.stringify(sourceMap);
|
||||||
|
}
|
||||||
|
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.setHeader('Content-Type', 'application/json');
|
||||||
res.end(sourceMap);
|
res.end(sourceMap);
|
||||||
Activity.endEvent(startReqEventId);
|
Activity.endEvent(startReqEventId);
|
||||||
|
|
Loading…
Reference in New Issue