本页还没有译文
本页 4 段还没译成한국어,下面显示的是英文原文。Re-map import paths
还没翻译译自英文(bun.com)本页 4 段都还没译
Bun 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.
{
"compilerOptions": {
"paths": {
"my-custom-name": ["./node_modules/zod"],
"@components/*": ["./src/components/*"]
}
}
}With this tsconfig.json, Bun re-writes the following imports:
import { z } from "my-custom-name"; // imports from "zod"
import { Button } from "@components/Button"; // imports from "./src/components/Button"See TypeScript.
AI 翻译查看英文原文