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

feat: build specific package(s) in monorepos #121

Closed
wants to merge 3 commits into from
Closed

feat: build specific package(s) in monorepos #121

wants to merge 3 commits into from

Conversation

enisdenjo
Copy link
Collaborator

@enisdenjo enisdenjo commented Aug 9, 2022

Running yarn build @graphql-tools/url-loader in graphql-tools would build only the @graphql-tools/url-loader package in packages/loaders/url.

Furthermore, running yarn build @graphql-tools/url-loader @graphql-tools/utils would build only @graphql-tools/url-loader and @graphql-tools/utils.

Do note that the build step won't have a big performance gain due to tsc (which still has to check the whole project). Since monorepos often reference other packages within, isolated tsc builds seem to not be possible.

@changeset-bot
Copy link

changeset-bot bot commented Aug 9, 2022

🦋 Changeset detected

Latest commit: fbf5e9f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
bob-the-bundler Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@enisdenjo enisdenjo changed the title feat: build specific package in monorepos feat: build specific package(s) in monorepos Aug 9, 2022
@n1ru4l
Copy link
Collaborator

n1ru4l commented Aug 15, 2022

@enisdenjo Do we still need this with the incremental build flag (#123 (review))? The only optimization it does right now would be to avoid copying unaffected files. 🤔

Not sure whether this optimization is worth it at this stage.

What do you think?

@enisdenjo
Copy link
Collaborator Author

@n1ru4l you're right, and since we cannot isolate TS to build just one package, there is no speed improvements whatsoever. I'd say #123 is enough for now.

@enisdenjo enisdenjo closed this Aug 15, 2022
@enisdenjo enisdenjo deleted the build-specific-pkg branch August 15, 2022 07:42
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 this pull request may close these issues.

None yet

2 participants