You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support passing in a cwd option to Service#build().
Use-case
Currently, much of esbuild's path resolution and output path generation appears to depend on the working directory. Using esbuild as a component in a larger system means careful management of the working directory in order to prevent any conflicts with other components that also rely on cwd. I anecdotally observed that cwd also appears to be determined at the time the service is spawned and remains bound to that for its lifetime. That simplified working directory management, but I think esbuild could allow this to be explicit.
The text was updated successfully, but these errors were encountered:
Yes I agree. I'm planning to do this in a breaking change. This will also help allow sharing the underlying service between builds with different working directories. Right now they spawn separate processes.
Description
Support passing in a
cwd
option toService#build()
.Use-case
Currently, much of
esbuild
's path resolution and output path generation appears to depend on the working directory. Usingesbuild
as a component in a larger system means careful management of the working directory in order to prevent any conflicts with other components that also rely oncwd
. I anecdotally observed thatcwd
also appears to be determined at the time the service is spawned and remains bound to that for its lifetime. That simplified working directory management, but I thinkesbuild
could allow this to be explicit.The text was updated successfully, but these errors were encountered: