1---2name: bun-re-map-import-paths3description: Re-map import paths4---56# Re-map import paths78Bun reads the `paths` field in your `tsconfig.json` to re-write import paths. This is useful for aliasing package names or avoiding long relative paths.910```json tsconfig.json icon="file-json" theme={"theme":{"light":"github-light","dark":"dracula"}}11{12 "compilerOptions": {13 "paths": {14 "my-custom-name": ["zod"],15 "@components/*": ["./src/components/*"]16 }17 }18}19```2021***2223With the above `tsconfig.json`, the following imports will be re-written:2425```ts tsconfig.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}26import { z } from "my-custom-name"; // imports from "zod"27import { Button } from "@components/Button"; // imports from "./src/components/Button"28```2930***3132See [Docs > Runtime > TypeScript](/runtime/typescript) for more information on using TypeScript with Bun.
Run npx skillmds@latest add jarle/bun-re-map-import-paths in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Re-map import paths It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
jarle (@jarle) published this skill. Their other Agent Skills are listed on their SkillMD profile.