resolve hook doesn't respect tsconfig's compilerOptions
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 40.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
It seems that esubuild's buitin resolve will return more information about tsconfig than resolve hook, which will affect transform result such as `UseDefineForClassFields`
https://github.com/evanw/esbuild/blob/master/internal/bundler/bundler.go#L788-L810 resolve hook doesn't support return anything about tsconfig. you can see difference in the demo here https://github.com/hardfist/esbuild-bug/tree/main
we can fix this if we support pass compilerOptions to esbuild directly other than rely on resolve result about tsconfig(which seems rarely useful and inefficient for real world case and rollup and webpack doesn't support this)
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 linked demo, then inspect internal/bundler/bundler.go at lines 788-810 and compare built-in resolve behavior with the resolve hook. Trace how tsconfig compilerOptions reach the transform result, including UseDefineForClassFields. Done means the resolve-hook path produces the same relevant compilerOptions behavior as built-in resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, typescript
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100