Skip to content

[Bug]: can not resolve path alias from tsconfig when using ${configDir} template variable #897

@ianzone

Description

@ianzone

Version

System:
    OS: Linux 5.15 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13800H
    Memory: 10.55 GB / 15.45 GB
    Container: Yes
    Shell: 5.9 - /home/linuxbrew/.linuxbrew/bin/zsh

Details

considering tsconfig

{
  "extends": "@es-proj/configs/tsconfig.react",
  "compilerOptions": {
    "rootDir": "src"
  }
}

in @es-proj/configs/tsconfig.react, there is

    "baseUrl": "${configDir}",
    "paths": {
      "src/*": ["src/*"],
      "@/*": ["src/*"],
    }

but rslib can't resolve that path alias.

Reproduce link

https://github.com/ianzone/antd-enhanced

Reproduce Steps

clone, install, remove baseUrl and paths from tsconfig.json, then run dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions