vercel / vercel/ncc

Bundle type declarations (through option?)

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

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

Probably using https://www.npmjs.com/package/dts-bundle-webpack?

If it's an option it can be run after the main build.

ncc build src/index.ts -o dist/main
ncc build dist/types/index.d.ts -o dist/typings --dts
rm -rf dist/types

Would be good if it reads the typings / types field.

Contributor guide

No contributing guide indexed for this repository

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 by tracing how the ncc build handles src/index.ts and the generated dist/types/index.d.ts, then check how the package’s typings/types field is read. Use the proposed ncc commands as a baseline and define what the option should produce in dist/typings, including whether cleanup of dist/types is part of the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.