add-peer-dependencies

0.1.7 • Public • Published

add-peer-dependencies

npm version

Install/remove peer dependencies as direct dependencies

Why

This addresses a fairly specific need that I've been running into and haven't found a more elegant way to address: webpack does not resolve modules in the same way as pnpm or npm. In general, this isn't a huge deal, but I have a bunch of re-usable webpack configurations that require a variety of peers... include webpack and webpack-cli.

In order to hoist these peers to a level of visibility where webpack can find them (especially when operating within a pnpm monorepo where all peers are hoisted to the root, rather than subpackage level), they have to be installed as direct dependencies of the package where webpack needs to operate.

Install

npm i -D add-peer-dependencies

Usage

To install peer dependencies:

npx add-peer-dependencies -w

To remove peer dependencies installed with this tool:

npx add-peer-dependencies -rw

Dependencies (2)

Dev Dependencies (7)

Package Sidebar

Install

npm i add-peer-dependencies

Weekly Downloads

6

Version

0.1.7

License

GPL-3.0

Unpacked Size

59.7 kB

Total Files

11

Last publish

Collaborators

  • battis