mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Add option to bundle server to generate full sourcemaps from babel
Reviewed By: bestander Differential Revision: D3863894 fbshipit-source-id: a282758e022d403743841bc59277196e6741ed18
This commit is contained in:
committed by
Facebook Github Bot 6
parent
fa6191f6ac
commit
e6bec9cb80
@@ -32,10 +32,11 @@ function getSourceMapForUrl(url, onFailure, onSuccess) {
|
||||
}
|
||||
|
||||
const parsedUrl = urlLib.parse(url);
|
||||
const mapPath = parsedUrl.pathname.replace(/\.bundle$/, '.map');
|
||||
const options = {
|
||||
host: 'localhost',
|
||||
port: parsedUrl.port,
|
||||
path: parsedUrl.pathname.replace(/\.bundle$/, '.map') + parsedUrl.search,
|
||||
path: mapPath + parsedUrl.search + '&babelSourcemap=true',
|
||||
};
|
||||
|
||||
http.get(options, (res) => {
|
||||
|
||||
@@ -79,10 +79,11 @@ class TreeTransformator {
|
||||
}
|
||||
|
||||
const parsedUrl = urlLib.parse(url);
|
||||
const mapPath = parsedUrl.pathname.replace(/\.bundle$/, '.map');
|
||||
const options = {
|
||||
host: 'localhost',
|
||||
port: parsedUrl.port,
|
||||
path: parsedUrl.pathname.replace(/\.bundle$/, '.map') + parsedUrl.search,
|
||||
path: mapPath + parsedUrl.search + '&babelSourcemap=true',
|
||||
};
|
||||
|
||||
http.get(options, (res) => {
|
||||
|
||||
Reference in New Issue
Block a user