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

tsdx build only if src/ is ahead of dist/ #1157

Open
doliG opened this issue Oct 12, 2022 · 0 comments
Open

tsdx build only if src/ is ahead of dist/ #1157

doliG opened this issue Oct 12, 2022 · 0 comments

Comments

@doliG
Copy link

doliG commented Oct 12, 2022

Current Behavior

I'm using tsdx alongside a next.js app in a monorepo (managed with yarn workspace). My folder structure is:

packages/
  frontend/  # nextjs app
  library/   # tsdx lib used by next js (and others)
  # ... other packages

Managing lib in yarn is very simple, I just added @my-workspace/library in frontend/package.json and yarn is handling the rest.

I have a "prestart" and "prebuild" hook on my frontend package so, each time I run it, tsdx library is fully rebuilt. This is annoying cause the lib build is 10-15x slower than frontend.

We don't want to commit the build of the lib because we think it's not a good practice (tell me if we're wrong).

Suggested Solution

So the ideal solution could be to add an option on tsdx build to rebuild only if src/ has changed since last built in dist/, or use incremental build.

Who does this impact? Who is this for?

For all ppl using tsdx in a monorepo where their lib is a required deps of other packages

Describe alternatives you've considered

Askl lib maintainer (hello @brozorec) to commit dist/ when they change the lib.

Thank you ❤️

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