-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Remove type bundling recommendation for CLIs #70
Comments
It only bundles in dev dependencies that are imported. For example, tsx is also designed to be used with npx and has You can vet the results with pkg-size: https://pkg-size.dev/tsx |
There seems to be a confusion here so the issue itself is not valid, but I'm going to leave this open with the action item to be to improve the docs to clarify this. |
Do you think the recommendation to include types is also still valid even for things like CLI tools and other packages that are not libraries? |
Good point. We should turn that recommendation off if the package is only a CLI (only has the |
or just add a flag to disable it? |
Feature request
I'd like an option to totally ignore all devDependencies and to not recommend moving types to the dependencies array
Motivations
I might very well be misunderstanding how things works. If so, please correct me. But for my use case I think it'd make sense to have an option to totally ignore devDependencies. And also to not print the recommendation to bundle types (Recommendation: "@types/findup-sync" is externalized because "findup-sync" is in "dependencies". Place "@types/findup-sync" in "dependencies" as well so users don't have missing types.)
I'm using pkgroll to bundle up a TS project to be used by npx. So it's not supposed to be consumed by anyone, so there is no need for any type information. And my devDeps are things like "tsx" and "typescript". I don't see a reason to bundle stuff like that. (Maybe tree shaking already takes care of that concern)
Alternatives
One alternative is what I'm doing now: Just ignore the recommendations - and hope for the best when it comes to tree shaking taking care of not actually bundling my devDeps
Additional context
No response
Bugs are expected to be fixed by those affected by it
Compensating engineering work financially will speed up resolution
The text was updated successfully, but these errors were encountered: