mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 13:44:04 +00:00
[ReactNative][Packager] Fix source maps for minified sources
Summary: The packager was ignoring minification for source map requests.
This commit is contained in:
parent
200fa6debc
commit
7bb0ff535c
@ -186,6 +186,10 @@ class Bundle {
|
||||
|
||||
options = options || {};
|
||||
|
||||
if (options.minify) {
|
||||
return this.getMinifiedSourceAndMap().map;
|
||||
}
|
||||
|
||||
if (this._shouldCombineSourceMaps) {
|
||||
return this._getCombinedSourceMaps(options);
|
||||
}
|
||||
|
4
packager/react-packager/src/Server/index.js
vendored
4
packager/react-packager/src/Server/index.js
vendored
@ -370,7 +370,9 @@ class Server {
|
||||
res.end(bundleSource);
|
||||
Activity.endEvent(startReqEventId);
|
||||
} else if (requestType === 'map') {
|
||||
var sourceMap = JSON.stringify(p.getSourceMap());
|
||||
var sourceMap = JSON.stringify(p.getSourceMap({
|
||||
minify: options.minify,
|
||||
}));
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.end(sourceMap);
|
||||
Activity.endEvent(startReqEventId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user