npm.io
0.6.1 • Published 1 year ago

@swc-node/sourcemap-support

Licence
MIT
Version
0.6.1
Deps
2
Size
36 kB
Vulns
0
Weekly
0
Stars
2.0K

@swc-node/sourcemap-support

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
}

Keywords