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:
Charles Dick
2016-09-15 06:51:24 -07:00
committed by Facebook Github Bot 6
parent fa6191f6ac
commit e6bec9cb80
4 changed files with 15 additions and 5 deletions

View File

@@ -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) => {

View File

@@ -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) => {