evanw / evanw/esbuild

Distributing the Transform API as a standalone package

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

Description

I'd like to suggest separating the Transform API into its own npm package.

esbuild's distribution size is around 10MB, which may be due to features like the CLI, bundler, builder, watcher, and server. The Transform API alone might have a significantly smaller footprint.

Many tools rely on esbuild solely for transformations without requiring other esbuild functionality. Separating this API could reduce disk usage and install time across npm installations, benefiting the ecosystem and users who only need transformations.

I understand this may introduce a maintenance burden and may not align with esbuild's compiled Go-based architecture. Still, I'd appreciate any insights on whether such a separation might be feasible and beneficial.

Thank you!

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name any files, tests, or entry points. Start by reviewing esbuild's Transform API and how its Go-based distribution is packaged, then determine whether a standalone npm package is feasible and what functionality it would contain. Done would require an agreed design and implementation plan, not just a local edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
api, build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.