Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

typescript-rewrite-paths

aleclarson38MIT1.3.1TypeScript support: included

Rewrite import paths in TypeScript code

typescript, rewrite, import, paths

readme

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