Skip to content

A vscode extension that fixes imports of TypeScript files from sibling packages in a mono repo (e.g. Lerna)

Notifications You must be signed in to change notification settings

Que3216/vscode-mono-repo-import-fixer

Repository files navigation

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 .tsx or .js files that are nested inside a 'packages' directory.

Usage

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

About

A vscode extension that fixes imports of TypeScript files from sibling packages in a mono repo (e.g. Lerna)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages