Skip to content

Commit

Permalink
Add ignoreList to our source maps (facebook#28310)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sebmarkbage authored and AndyPengc12 committed Apr 15, 2024
1 parent f607b2f commit ce5c9a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ce5c9a7

Please sign in to comment.