typescript-rewrite-paths
import {rewritePaths} from 'typescript-rewrite-paths'
// The input and output are code strings.
const output = rewritePaths(input, path => {
// Return a string or falsy.
return path
})
Rewrite import paths in TypeScript code
import {rewritePaths} from 'typescript-rewrite-paths'
// The input and output are code strings.
const output = rewritePaths(input, path => {
// Return a string or falsy.
return path
})