evanw / evanw/esbuild

mark entry points as external

Open
#2,979 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
40.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

esbuild doesn't allow marking entry points as externals. this is reasonable, but there is another use case.
an entry point could be imported within another entry point, in this case, we need to dynamically import it as if it built separately.

say we have two entry points a.ts and b.ts, and a.ts marked as external
both entry points will be built separately, ignoring the fact that each one may be marked as external in another context.

as b.ts imports a.ts, a.ts could be safely marked as external.

conclusion:
any file could be introduced as an entry point and marked as an external in the same configuration.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no implementation files or tests. Start by reproducing the two-entry-point case with a.ts and b.ts, where b.ts imports a.ts and a.ts is external; done means the configuration accepts any entry point as external and dynamically imports it when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, typescript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.