Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Typescript MonoRepo Import FixerNew to Visual Studio Code? Get it now.
Typescript MonoRepo Import Fixer

Typescript MonoRepo Import Fixer

Q

|
16,321 installs
| (2) | Free
Automatically fixes imports of TypeScript files from sibling packages in a mono repo (e.g. Lerna)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Typescript Mono Repo Import Helper

If you have a Lerna mono-repo, then vs-code may auto-generate imports for you that look like this:

import { doSomething } from "../../package2/src/doSomething.ts";

doSomething();

When you really want the import to look like this:

import { doSomething } from "@my-app/package2";

doSomething();

This extension automatically converts any imports of the first format to the second format when you save the file.

It runs on any .ts or .tsx files that are nested inside a 'packages' directory.

Usage

Install the extension, and it'll fix the imports whenever you hit save.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft