lukeed / lukeed/tsm

[Feature]: supports custom mainField

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.2k
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I know it's kind of out of scope, but it would be really nice if tsm could supports custom mainField, then we can do something like this.
* xxx-lib/package.json
```json5
{
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts"
}
```
we could use tsm to load the xxx-lib source file without compile it to js in monorepo.

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 reviewing how tsm resolves package entry fields, using the example package.json with source, main, and types as the expected case. Determine how a custom mainField would select src/index.ts without compiling it to JavaScript; done means the xxx-lib source entry can be loaded in the monorepo as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.