add-peer-dependencies

0.1.5 • 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

Readme

Keywords

none

Package Sidebar

Install

npm i add-peer-dependencies

Weekly Downloads

5

Version

0.1.5

License

GPL-3.0

Unpacked Size

59.4 kB

Total Files

11

Last publish

Collaborators

  • battis