Bun Module Resolution
How Bun resolves modules and handles imports in JavaScript and TypeScript
Install
npx skills add jarle/bun-skills --skill Bun Module Resolutiongit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-runtime-module-resolution ~/.claude/skills/Bun-Module-ResolutionPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Module Resolution
> How Bun resolves modules and handles imports in JavaScript and TypeScript
Module resolution in JavaScript is a complex topic.
The ecosystem is currently in the midst of a years-long transition from CommonJS modules to native ES modules. TypeScript enforces its own set of rules around import extensions that aren't compatible with ESM. Different build tools support path re-mapping via disparate non-compatible mechanisms.
Bun aims to provide a consistent and predictable module resolution system that just works. Unfortunately it's still quite complex.
## Syntax
Consider the following files.
<CodeGroup>
```ts index.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"}}
import { hello } from "./hello";
hello();
```
```ts hello.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"}}
export function hello() {
console.log("Hello world!");
}
```
</CodeGroup>
When we run `index.ts`, it prints "Hello world!".
```bash icon="terminal" terminal theme={"theme":{"light":"github-light","dark":"dracula"}}
bun index.ts
Hello world!
```Details
- Skill name
Bun Module Resolution- Repository
- jarle/bun-skills
- Path
skills/bun-runtime-module-resolution/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun Module Resolution skill do?
How Bun resolves modules and handles imports in JavaScript and TypeScript
How do I install the Bun Module Resolution skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Module Resolution. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun Module Resolution popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Bun Node API
9jarle/bun-skills
Use Bun's Node-API module to build native add-ons to Node.js
Bun Minifier
9jarle/bun-skills
Reduce bundle sizes with Bun's JavaScript and TypeScript minifier
Bun Node.js Compatibility
9jarle/bun-skills
Bun's compatibility status with Node.js APIs, modules, and globals
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.