Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set CWD programmatically #689

Closed
ggoodman opened this issue Jan 18, 2021 · 1 comment
Closed

Set CWD programmatically #689

ggoodman opened this issue Jan 18, 2021 · 1 comment

Comments

@ggoodman
Copy link

Description

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.

@evanw
Copy link
Owner

evanw commented Jan 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants