Javascript - pnpm

About

node_module

pnpm differs from the other package manager via the structure of the node_modules folder where:

  • the directory structure is flat with one dependency by directory
  • and the dependency of dependency are created via symlinks and are stored in the .registry.npmjs.org

Example with one dependency foo that have bar as sub-dependency (The arrow represents a symlink)

node_modules
├─ foo -> .registry.npmjs.org/foo/1.0.0/node_modules/foo
└─ .registry.npmjs.org
   ├─ foo/1.0.0/node_modules
   |  ├─ bar -> ../../bar/2.0.0/node_modules/bar
   |  └─ foo
   |     ├─ index.js
   |     └─ package.json
   └─ bar/2.0.0/node_modules
      └─ bar
         ├─ index.js
         └─ package.json

Documentation / Reference


Powered by ComboStrap