---
url: /reference/OutputOptions.sourcemapIgnoreList.md
---
# sourcemapIgnoreList

* **Type**: `boolean` | `string` | `RegExp` | ((`relativeSourcePath`, `sourcemapPath`) => `boolean`)
* **Optional**

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 list
* `true`: Include all source files in the ignore list
* `string`: Files containing this string in their path will be included in the ignore list
* `RegExp`: Files matching this regular expression will be included in the ignore list
* `function`: Custom function to determine if a source should be ignored

:::tip 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.
:::

## Union Members

`boolean`

***

`string` | `RegExp`

***

### Function

(`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/
```
