dist contains whole typescript lib
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.8k
- Forks
- 326
- PR merge metrics
- No merged PRs in 30d
Description
When I use ncc build, the output contains all typescript/lib, such as below:

I try to comment a require statement like require(someConfigPath),it then no longer output typescript/lib. It seems like import a module using "require" has some problems.
Is there any workaround to use "require" and the dist dir not contains the whole typescript/lib ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with ncc build and a dynamic require(someConfigPath), then inspect why the generated dist output includes all of typescript/lib. Done means preserving the require behavior without bundling the whole TypeScript library; the issue names no source files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100