@samitouri / QOS-React / commits / dc3178151b

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.

Sebastian Markbåge committed Feb 13, 2024 at 12:54 UTC dc3178151b8cb0359e5c36b8ed57458b807ae8e3
1 file changed +3
scripts/rollup/build.js
+3
@@ -575,6 +575,9 @@ function getPlugins(
575 sourcemapAfterClosure.sources = [preMinifiedFilename];
576 sourcemapAfterClosure.file = filename;
577
578 + // All our code is considered "third-party" and should be ignored by default.
579 + sourcemapAfterClosure.ignoreList = [0];
580 +
581 // We'll write the pre-minified source to disk as a separate file.
582 // Because it sits on disk, there's no need to have it in the `sourcesContent` array.
583 // That also makes the file easier to read, and available for use by scripts.