0.5.0 • Published 2 months ago

@swc-node/sourcemap-support v0.5.0

Weekly downloads
1,289
License
MIT
Repository
github
Last release
2 months ago

@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
}