From 4de1e44a41765234b19e6a76ccdffdabb9f07862 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Wed, 8 Nov 2023 10:52:20 +0000 Subject: [PATCH] refactor[ci/build]: dont generate sourcemaps for BROWSER_SCRIPT bundles --- scripts/rollup/build.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index 0851ea3b0444..5f14625b2287 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -406,6 +406,10 @@ function getPlugins( // UMD builds are rarely used and not worth having sourcemaps. const needsSourcemaps = needsMinifiedByClosure && + // This will only exclude `unstable_server-external-runtime.js` artifact + // To start generating sourcemaps for it, we should stop manually copying it to `facebook-www` + // and force `react-dom` to include .map files in npm-package at the root level + bundleType !== BROWSER_SCRIPT && !isUMDBundle && !sourcemapPackageExcludes.includes(entry) && !shouldStayReadable;