esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

Include initialOptions in BuildContext

Open mbrevda opened this issue 3 months ago • 1 comments

Expose an initialOptions like property on the build context. This can make it easier to identify the context, and/or allow scenarios such as adding entrypoints from build A as watchFiles to build A where B manages the lifecycle of A (i.e. where A is a dependent of B, allow B to introspect A)

mbrevda avatar Dec 02 '25 16:12 mbrevda

Sure I don't see why not. You should be able to already do that now by just assigning to context.initialOptions, although I suppose it isn't clean if you're using TypeScript unless esbuild updates its types.

Marking this as a breaking change as it changes the BuildContext interface. So it should be done in a breaking change release.

evanw avatar Dec 03 '25 19:12 evanw