generate-package-json-webpack-plugin

JSON →
library 2.7.0 ·javascript
verified May 27, 2026

A Webpack plugin that generates a minimal package.json containing only the external dependencies actually used by your bundle. Version 2.7.0 is current, with regular updates. It works with Webpack 4 and 5, and is typically paired with webpack-node-externals. Key differentiators: automatic version resolution from node_modules, support for excluding dependencies, forcing a Webpack version in mixed environments (e.g., Nx), and flexibility to add non-code dependencies with explicit version prefixes. Ships TypeScript types.

total hits 13
actors 5 distinct systems
last hit 2d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom · 🇩🇪 Germany · 🇪🇸 Spain