{"library":"stats-webpack-plugin","title":"Stats Webpack Plugin","type":"library","description":"The `stats-webpack-plugin` is a Webpack plugin designed to write the build statistics to a file, typically `stats.json`. This enables developers and tools to analyze various aspects of the build, such as module sizes, dependencies, and timing information, by exposing Webpack's internal `stats.toJson` output. The package's current stable version is 0.7.0, last published in 2018, making it effectively abandoned and primarily compatible with older Webpack versions (likely Webpack 1.x, as its peer dependency states `>=1.0.0`). It differentiates itself by offering a straightforward, no-frills method to obtain raw build statistics for custom processing, unlike more feature-rich alternatives that provide integrated analysis and visualization tools. Its lack of recent updates means it does not support modern Webpack features or syntax.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install stats-webpack-plugin"],"cli":null},"imports":["const StatsPlugin = require('stats-webpack-plugin');","const StatsPlugin = require('stats-webpack-plugin');","plugins: [new StatsPlugin('stats.json', options)]"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/unindented/stats-webpack-plugin","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/stats-webpack-plugin","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"const StatsPlugin = require('stats-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n  mode: 'development', // Or 'production'\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js',\n  },\n  plugins: [\n    new StatsPlugin('stats.json', {\n      // Options passed directly to webpack's stats.toJson()\n      // Note: Options like 'chunkModules' might be deprecated or behave\n      // differently in newer webpack versions (if you try to use it).\n      // This plugin is designed for webpack 1.x compatibility.\n      chunkModules: true,\n      exclude: [/node_modules[\\\\\\/]react/]\n    })\n  ]\n};","lang":"javascript","description":"This quickstart demonstrates how to integrate `stats-webpack-plugin` into a basic Webpack configuration to generate a `stats.json` file in the output directory, applying basic filtering.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}