mirror of https://github.com/status-im/metro.git
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
24b1feae13
commit
a37d8735d7
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue