You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if this plugin hoisted all dependencies up to node_module root and avoided duplicates.
Currently you can end up with very deep structures, with tons of duplicate dependencies.
Like if your sls-function depend on A and B, and A depend on externalA, but B also depend on externalA.
both A and B could also depend on local dependency C, which would end up like this:
Sorry for the long delay in replying, I'd forgotten about the notification for this issue and was just reminded when another issue came in today.
I agree, this would be a nice feature to have. However, it's not trivial to implement as we are starting to venture into package manager dependency management territory. There's a lot of hidden complexity in matching versions, deciding which module(s) should be hoisted and which one's shouldn't (when different versions of the same package are required).
The ideal solution would be to bypass this and rely upon the decisions that the existing package manager has made when hoisting dependencies, e,g, examine the file tree to determine where to place the symlinks.
I'll have a look at this in the near future when time permits. In the meantime, if anyone else would like to contribute, please feel free! 👍
It would be nice if this plugin hoisted all dependencies up to node_module root and avoided duplicates.
Currently you can end up with very deep structures, with tons of duplicate dependencies.
Like if your
sls-function
depend onA
andB
, andA
depend onexternalA
, butB
also depend onexternalA
.both
A
andB
could also depend on local dependencyC
, which would end up like this:When you have duplicate dependencies like this,
instanceof
wont work properly across duplications either.The text was updated successfully, but these errors were encountered: