0.5.1 • Published 7 months ago
@swc-node/sourcemap-support v0.5.1
@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
}