Inspectpack is an inspection tool for Webpack frontend JavaScript bundles, providing detailed analysis of module sizes, duplicates, and optimization opportunities. Current stable version is 4.7.1 (released 2024). It is maintained by Formidable Labs and can be used both as a Webpack plugin (DuplicatesPlugin) and as an offline CLI tool. Key differentiators: it is the engine behind webpack-dashboard, offers actionable reports for trimming wasted bytes, and supports both plugin and CLI usage with commands like duplicates, versions, and sizes. It has TypeScript types shipped and requires Node >=6.
npm install inspectpackVerified import paths — ran on the pinned version, not inferred.
Shows how to add DuplicatesPlugin to webpack config and run CLI duplicates action.
Upgrade Node to v6 or higher.
Replace 'emitHandler' with 'emitErrors: true' or implement custom handling.
Use inspectpack@3 if you are on webpack 3 or older.
Run inspectpack separately for each bundle or use the plugin.
Install inspectpack: npm install --save-dev inspectpack, and use require('inspectpack/plugin')Upgrade webpack to 4+ or use inspectpack@3.
Ensure the bundle path is correct and the file is a valid webpack output.
Remove emitHandler and set emitErrors: true or implement custom logic.
No dependency data recorded yet.