-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Website dependencies in graphile-worker package.json #443
Comments
Oops! I should have caught this during review; thanks for the heads up! |
Fix released in 0.16.4 |
Appreciate the quick fix. Not as big of an issue, but I think types should still be moved to devDependencies as well. |
That would be a breaking change for |
In theory I could agree. But practically, I can't think of a reason why anyone would need typescript types in a production install / build? Even if you do, you're highly unlikely to be able to use npm install --prod anyways, as you'll miss out on the types from many other packages (unless they are meant to be bundled, which is a whole different topic, but bundlers have access to devdeps anyways). And let's say you even do get away with it by some miracle, then what use are types in production if you don't build your app? It's not like you get runtime errors. There's another 2 packages in my case that add nodejs types to my production build. Both are by accident by the authors, never by design. But they do add 10mb+ of dead weight into the build. This stuff matters in the serverless world. |
When you install a module from npm you only ever install the dependencies of that module; devDependencies are for your application alone, not for its dependencies. |
Summary
I was wondering why my server docker image includes 10mb of fontawesome icons. Turns out graphile-worker is the culprit.
All of the following files should be moved to devDependencies – as they are not dependencies of the built lib:
Happy to open a PR if needed.
The text was updated successfully, but these errors were encountered: