node-source-map-support
node-source-map-support copied to clipboard
How to use with vm.runInContext ()?
import {transpile} from 'typescript';
const jsCode = transpile(<TS-CODE>, {inlineSourceMap: true}, <path/to/source.ts>);
const sandbox = {exports: {}};
runInContext(jsCode , createContext(sandbox), {filename: <path/to/source.ts>});
How to use with vm.runInContext ()?