﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>---
url: /reference/OutputOptions.sourcemapPathTransform.md
---
# sourcemapPathTransform

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

A transformation to apply to each path in a sourcemap.

## 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

`string`

## Example

```js
export default defineConfig({
  output: {
    sourcemap: true,
  