sourcemapIgnoreList
- Type:
optionalsourcemapIgnoreList:boolean|StringOrRegExp| (relativeSourcePath,sourcemapPath) =>boolean
Defined in: options/output-options.ts:201
Control which source files are included in the sourcemap ignore list.
Files in the ignore list are excluded from debugger stepping and error stack traces.
false: Include no source files in the ignore listtrue: Include all source files in the ignore liststring: Files containing this string in their path will be included in the ignore listRegExp: Files matching this regular expression will be included in the ignore listfunction: Custom function to determine if a source should be ignored
Performance
Using static values (boolean, string, or RegExp) is significantly more performant than functions. Calling JavaScript functions from Rust has extremely high overhead, so prefer static patterns when possible.
Type Declaration
boolean
StringOrRegExp
(relativeSourcePath, sourcemapPath) => boolean
Parameters
relativeSourcePath
string
The relative path from the generated .map file to the corresponding source file.
sourcemapPath
string
The fully resolved path of the generated sourcemap file.
Returns
boolean
Example
js
// ✅ Preferred: Use RegExp for better performance
sourcemapIgnoreList: /node_modules/
// ✅ Preferred: Use string pattern for better performance
sourcemapIgnoreList: "vendor"
// ! Use sparingly: Function calls have high overhead
sourcemapIgnoreList: (source, sourcemapPath) => {
return source.includes('node_modules') || source.includes('.min.');
}Default
ts
/node_modules/