[Feature]: supports custom mainField
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
- 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 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