vercel / vercel/ncc

Work out a way to avoid ".ts" and ".tsx" statting in node_modules

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We don't want to pick up these extensions in node_modules package resolutions - we only want to pick them up within the local application.

At the moment there are thousands of these stats going on that would significantly improve performance if they can be avoided.

Ideally any package lookup resolver path like require('twilio') could just turn off the custom extensions, with the custom extensions only applying when the parent and resolution both lie in "/path/to/app/" and not "/path/to/app/node_modules/".

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 ncc's package resolution path for a request such as require('twilio') and identify where .ts and .tsx filesystem stats are issued. Compare resolution under /path/to/app with /path/to/app/node_modules; done means package lookups avoid those extension stats while local application resolution still considers them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, typescript
Domain
build-system, performance, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.