esbuild
esbuild copied to clipboard
Include initialOptions in BuildContext
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)
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.