hashicorp / next-remote-watch

Decorated local server for next.js that enables reloads from remote data changes
Mozilla Public License 2.0
353 stars 19 forks source link

Dependency trimming #22

Closed ghost closed 3 years ago

ghost commented 3 years ago

Thanks for implementing this utility. I'm curious if you have any plans on refactoring the implementation to reduce the number of transitive dependencies?

jescalan commented 3 years ago

Could you expand a little on what you mean by this? Are you talking about direct dependencies?

ghost commented 3 years ago

I was wondering if you are considering shopping for alternative direct dependencies such that the total transitive dependencies are reduced in the future, or if the implementation is fairly settled at this point?

jescalan commented 3 years ago

I still do not know what you're talking about honestly. We are not actively aiming to refactor this library right now, or considering any major changes or features. If anyone has suggestions, we are open to them!

ghost commented 3 years ago

Okay, no worries. I will close this issue.

I was hesitating to add 75 transitive dependencies to my next site to use this utility, so I just wanted to figure out if that will always be the case or not. It may just be that the current direct dependencies are the best options in npm currently.

jescalan commented 3 years ago

Sounds good! Again you are more than welcome to look through the code and suggest changes if you'd like, in fact, that would be wonderful. This is in general a very slim package, and is only used in local development. That on top of the fact that nextjs itself surely has many, many hundreds of dependencies in its tree, many of them likely shared and deduped with this package, makes this not really stick out to me as a major issue.

ghost commented 3 years ago

That's a good point about nextjs sharing dependencies. The main difference seems to be express. I can shop around for a lighter dependency alternative to express and report back.

ghost commented 3 years ago

I ended up not needing a watcher for my use case, so I am not planning on finding an express alternative anymore.