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

[Feature request] Lets add "cwd" option to JS API #1292

Open
vovkasm opened this issue Feb 10, 2025 · 0 comments
Open

[Feature request] Lets add "cwd" option to JS API #1292

vovkasm opened this issue Feb 10, 2025 · 0 comments

Comments

@vovkasm
Copy link

vovkasm commented Feb 10, 2025

  1. Tsup is so fast that I would like to run it via JS API without wasting time on fork/exec.
  2. At the same time, we use a monorepo and therefore run the build of several packages in parallel.
    And here is where the problem occurs - tsup uses process.cwd() when building without the ability to override the working directory, so points 1 and 2 cannot be implemented simultaneously.

Can we add cwd option to allow this use case? Some components already have this functional:

  • absWorkingDir in esbuild
  • typescript stuff should work relative to tsconfig.json
  • there is some process.cwd calls relative to rollup (don't know yet if this will be a problem)

I may try to experiment a little and if everything goes well make a pull request if the general consensus is that this feature is needed.

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

No branches or pull requests

1 participant