DEV Community

Cover image for TypeScript is quietly killing baseUrl (and most people haven’t noticed yet)
Harsh Mangalam
Harsh Mangalam

Posted on

TypeScript is quietly killing baseUrl (and most people haven’t noticed yet)

If you’re seeing this warning:

Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0

Yeah… it’s real.

For years, we’ve been doing this 👇

{
  "extends": "@workspace/typescript-config/bun.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    }
  }
}


Enter fullscreen mode Exit fullscreen mode

But TypeScript is moving away from module resolution hacks.

💡 The shift
TypeScript no longer wants to resolve your imports.

👉 Your runtime / bundler should do that (Bun, Vite, Next, etc.)
👉 TypeScript should just type-check

✅ The simple fix
Just remove baseUrl.

{
  "extends": "@workspace/typescript-config/bun.json",
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}

Enter fullscreen mode Exit fullscreen mode

⚡ Why this matters

  • Future-proof (TS 7 won’t break you)
  • Cleaner separation of concerns
  • Matches modern tooling direction

Top comments (0)