Skip to content

Commit

Permalink
Add ignoreList to our source maps (#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 Feb 13, 2024
1 parent 0d108f2 commit dc31781
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 dc31781

Please sign in to comment.