From ce5c9a7e913fb5df508cda683ae29f09460db437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Markb=C3=A5ge?= Date: Tue, 13 Feb 2024 12:54:06 -0500 Subject: [PATCH] Add ignoreList to our source maps (#28310) All our sources are considered third party and should be hidden in stack traces unless expanded. Our internals aren't actionable anyway. This doesn't really do much without tooling that actually forwards this to new generated source maps, in which case they probably just add them to ignorelist anyway. --- scripts/rollup/build.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index 0a2a584c5a5a7..d6f4155194af3 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -575,6 +575,9 @@ function getPlugins( sourcemapAfterClosure.sources = [preMinifiedFilename]; sourcemapAfterClosure.file = filename; + // All our code is considered "third-party" and should be ignored by default. + sourcemapAfterClosure.ignoreList = [0]; + // We'll write the pre-minified source to disk as a separate file. // Because it sits on disk, there's no need to have it in the `sourcesContent` array. // That also makes the file easier to read, and available for use by scripts.