* Makes the sources more human-readable in the source map * by removing webpack-specific prefixes
( sourcemap: RawSourceMap | null )
| 4575 | * by removing webpack-specific prefixes |
| 4576 | */ |
| 4577 | function transformSourceMap( |
| 4578 | sourcemap: RawSourceMap | null |
| 4579 | ): RawSourceMap | undefined { |
| 4580 | if (!sourcemap) return; |
| 4581 | const sources = sourcemap.sources |
| 4582 | ?.map(source => { |
| 4583 | return source.replace(/^webpack:\/\/?_N_E\/(?:\.\/)?/, ''); |
| 4584 | }) |
| 4585 | // Hide the Next.js entrypoint |
| 4586 | .map(source => { |
| 4587 | return source.startsWith('?') ? '[native code]' : source; |
| 4588 | }); |
| 4589 | |
| 4590 | return { ...sourcemap, sources }; |
| 4591 | } |
| 4592 | |
| 4593 | interface LambdaGroupTypeInterface { |
| 4594 | isApiLambda: boolean; |
no test coverage detected