Skip to content

[Bug]: redirect.dts.extension not handle barrel file correctly #775

@Jungzl

Description

@Jungzl

Version

System:                                                                                                                                                                                 
    OS: Windows 11 10.0.26100                                                                                                                                                             
    CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700                                                                                                                                     
    Memory: 2.14 GB / 15.77 GB                                                                                                                                                            
  Browsers:
    Edge: Chromium (131.0.2903.63)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    @rslib/core: ^0.5.0 => 0.5.0

Details

When redirect.dts.extension is enabled, entry file for barrel file reexport would be like

e.g. dist/index.d.ts

expect:

export { isBoolean } from './barrel/index.js';

actual:

export { isBoolean } from './barrel.js';

Reproduce link

https://github.com/Jungzl/rslib-project-issue-demo/tree/issue/dts

Reproduce Steps

  1. run pnpm build
  2. check dist/index.d.ts

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