UNPKG

@swc-node/sourcemap-support

Version:

Runtime sourcemap support in NodeJS

14 lines (10 loc) 326 B
# `@swc-node/sourcemap-support` ```ts import { SourcemapMap, installSourceMapSupport } from '@swc-node/sourcemap-support' installSourceMapSupport() function transform(sourcecode, filename, options) { const { code, map } = transformSync(sourcecode, filename, options) SourcemapMap.set(filename, map) return code } ```