evanw / evanw/esbuild

Pass tsconfig and package.json content to plugins

Open
#978 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
40.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

It can be really useful to have access to the content of the tsconfig.json and the package.json files when in a plugin. For example I have a plugin that runs the TypeScript compiler on `.ts` files when they're in a project that has the `emitDecoratorMetadata` option enabled because I have some legacy code that need this.

I'm assuming esbuild already has those files loaded since it properly resolves modules; so I'd expect that passing the content of those files would be a lot quicker than having the module resolve them based on the args.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the plugin API and the handling of tsconfig.json and package.json described in the issue. Determine how their contents could be exposed to plugins without requiring another module-resolution pass. Done means a plugin can access both file contents and use the TypeScript compiler option mentioned in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, 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.