From 15130d5fa2b00b5ffb3393c824d32cbcfac0b858 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Fri, 29 Sep 2017 05:38:15 -0700 Subject: [PATCH] Add Source Map support to e2e deltas in chrome debugger Reviewed By: jeanlauliac Differential Revision: D5917380 fbshipit-source-id: 31391bc03c420b8e7af5c840fbea2fb0dd5f7bbc --- local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js b/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js index e57b7e42fc..5a206ce228 100644 --- a/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js +++ b/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js @@ -49,7 +49,11 @@ URL.revokeObjectURL(cachedBundle.url); } - const blobContent = deltaPatcher.getAllModules(); + // To make Source Maps work correctly, we need to add a newline between + // modules. + const blobContent = deltaPatcher + .getAllModules() + .map(module => module + '\n'); // Build the blob with the whole JS bundle. const blob = new Blob(blobContent, {