protobuf.js
protobuf.js copied to clipboard
`@types/node` is listed as a prod dependency, adds 2MB to package size (unnecessarily?)
protobuf.js version: 7.3.3
@types/node should be listed as a devDependency. Here's the output of npmgraph showing the size of @types/node:
ping @mkruskal-google @sofisl
Is there any plans on resolving this? 🙏
I think that including a dependency on the Node.js typings isn't best practice, as then basically every library with typings on Npm would depend on that package, and instead it would be preferable if the end developers can add their own @types/node as a dev-dependency in their own projects.
This is currently causing us some issue when adding @valkey/valkey-glide (a native dependency that thus cannot be bundled) to our Lambda 😅
Will be thrilled to see it solved.
It would be great if this issue could be resolved. Adding @types/node to my web projects ends up polluting the global scope, and I can’t think of a way to prevent that. For example, in my web project, setTimeout infers its return type as Timeout instead of number.