-
Notifications
You must be signed in to change notification settings - Fork 59
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
Let people choose to only build specific packages #48
Comments
What's the desired flag/option name? Btw, also caching the built files would be cool too. This way it wouldn't even build/touch them if |
I'm mostly leaning towards not allowing this because I can't really see a use case for it because people should only ever do a build when they're publishing packages in which case you'll probably be building a lot of packages anyway and a slightly slower build won't really make a big difference. (and ideally the publishing would happen from CI where the bottleneck is more likely to be installing dependencies than running a build)
Preconstruct probably won't do caching because caching Babel transformations is impossible to do perfectly correctly(e.g. plugins like babel-plugin-codegen) and for apps technically imperfect caching solution is sometimes a problem though it's generally fine but for packages it's very problematic because it means publishing broken packages. |
This is already a feature. Exclude packages you don't want preconstruct to know about in the root package.json's {
"name": "my-monorepo",
"version": "1.0.0",
"yarn": {
"workspaces": {
"apps/*",
"libs/*"
}
},
"preconstruct": {
"packages": [
"libs/*"
]
}
} Packages inside |
@steve-taylor I think this issue is about building only one of the packages inside |
I'm also pretty keen on this for the Turborepo use case @alecdwm mentioned. I'd be happy to help contribute here and test things out, as I'm currently using Preconstruct with Turborepo and had to disable most caching in order to get things to work reliably. |
No description provided.
The text was updated successfully, but these errors were encountered: