Replies: 2 comments 7 replies
-
|
That is also a useful feature I am thinking about. in my team we develop infra tools, for example, A, B and C, and B depends on A. B may want to use the same dependencies(for example, webpack) from A instead of declare its own(which may cause multiple instance error). I think we can add a field that can export dependencies to the parent, the dependencies will be symlinked to parent node_modules so it can be access in parent. if parent already declared this dependency, the declared one will be used. |
Beta Was this translation helpful? Give feedback.
-
|
Just wondering out of curisosity whether that has been implemented or should we keep on using public-hoist-pattern to hoist all dependencies of such packages? Not really an issue but that feature would be indeed quite convenient especially for encapsulating development tool packages. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Some devs complain that with the non-hoisted node_modules structure they cannot create dependencies that bundle all their tools together. With npm, they can create a package that has eslint, jest, etc as dependencies and then they add this tooling package to their project and jest, eslint are added to node_modules.
Maybe we could support such case somehow.
Using an inherit feature for instance? Where we would inherit dev deps.
Or using a separate dependencies field, where the subdeps are hoisted. Or using some naming convention for such special dev deps.
Beta Was this translation helpful? Give feedback.
All reactions