web-infra-dev / web-infra-dev/rslib

[Bug]: Using `dts.bundle: true` does not fully bundle.

Open
#470 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐞 bug api-extractor
Dominant language
TypeScript
Stars
1k
Forks
67
Avg merge
6h 9m
Merged PRs (30d)
57

Description

Version
System:
  OS: Windows 11 10.0.22631
  CPU: (20) x64 13th Gen Intel(R) Core(TM) i9-13900H
  Memory: 10.85 GB / 31.75 GB
Browsers:
  Edge: Chromium (128.0.2739.42)
  Internet Explorer: 11.0.22621.3527

npmPackages: "@rslib/core": "^0.1.0"
Details

使用 dts.bundle: true 并没有打包完全


Using dts.bundle: true does not fully bundle.

Reproduce link

https://github.com/Zhang-Wei-666/rslib-bug-report/tree/2

Reproduce Steps

运行以下命令进行构建

pnpm i && pnpm build

查看打包产物 dist/index.d.ts 中可以发现以下内容未被打包

import type { UpperCaseCharacters } from './internal';
import type { WordSeparators } from './internal';

Run the following command to build.

pnpm i && pnpm build

Please check the packaged product at dist/index.d.ts to find the following content that has not been packaged.

import type { UpperCaseCharacters } from './internal';
import type { WordSeparators } from './internal';

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction repository and run pnpm i && pnpm build. Inspect dist/index.d.ts, especially the remaining imports from ./internal, and trace the declaration-bundling entry point that produced them. Done means the generated declaration output fully bundles these types without those unresolved internal imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.