{"id":15064975,"url":"https://github.com/designbyadrian/gatsby-plugin-size-analyzer","last_synced_at":"2025-04-10T13:09:03.535Z","repository":{"id":57244798,"uuid":"121513108","full_name":"designbyadrian/gatsby-plugin-size-analyzer","owner":"designbyadrian","description":"Extension of webpack-bundle-size-analyzer for Gatsby","archived":false,"fork":false,"pushed_at":"2023-04-20T14:28:41.000Z","size":100,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T11:45:57.183Z","etag":null,"topics":["gatsby-plugin","gatsbyjs","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/designbyadrian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-14T13:21:33.000Z","updated_at":"2023-03-07T04:42:52.000Z","dependencies_parsed_at":"2024-10-13T00:41:26.748Z","dependency_job_id":"fcb91a4f-1e78-45ed-8863-fc564c055170","html_url":"https://github.com/designbyadrian/gatsby-plugin-size-analyzer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designbyadrian%2Fgatsby-plugin-size-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designbyadrian%2Fgatsby-plugin-size-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designbyadrian%2Fgatsby-plugin-size-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designbyadrian%2Fgatsby-plugin-size-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/designbyadrian","download_url":"https://codeload.github.com/designbyadrian/gatsby-plugin-size-analyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247909138,"owners_count":21016475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gatsby-plugin","gatsbyjs","webpack"],"created_at":"2024-09-25T00:28:49.932Z","updated_at":"2025-04-10T13:09:03.502Z","avatar_url":"https://github.com/designbyadrian.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-plugin-size-analyzer\n\nExtension of [webpack-bundle-size-analyzer](https://github.com/robertknight/webpack-bundle-size-analyzer) by [Robert Knight](https://github.com/robertknight) for Gatsby\n\n## Installation\n\n`yarn add gatsby-plugin-size-analyzer`\n\n## How to use\n\n1. Include the plugin in your `gatsby-config.js` file.\n2. `gatsby build` to find \"size-analyzer.txt\" inside the project folder.\n\n```javascript\n// in gatsby-config.js\nplugins: [\n  `gatsby-plugin-size-analyzer`\n];\n```\n\n## Options\n\nDecide the name and location of your reports folder like so:\n\n```javascript\n// in gatsby-config.js\nplugins: [\n  {\n    resolve: `gatsby-plugin-size-analyzer`,\n    options: {\n      path: ['myreports/gatsby']\n    },\n  },\n];\n```\n\n⚠️ The folder named \"gatsby\" needs to exist before you build your project!\n\n### Important Note About Minified Code\n\nIf you minify/compress your code using the [approach recommended in the Webpack documentation](http://webpack.github.io/docs/optimization.html), which is to use the UglifyJS plugin, be aware that this tool will report the sizes of modules _before_ they are minified. This is because the statistics generated by `webpack --json` do not take account of plugins that operate on the bundle as a whole.\n\nKnowing the sizes of dependencies before they are minified can still be useful to get an idea of how much different dependencies are responsible for size of your minified bundle, but be aware that it can be misleading. This is because some libraries compress better than others.\n\nIf instead you minify modules in your bundle individually using a loader (eg. [the UglifyJS loader](https://www.npmjs.com/package/uglify-loader)), the stats output by `webpack --json` _will_ show minified sizes. If you want to get a better idea of the sizes of different dependencies after they are minified, you can temporarily remove the UglifyJS plugin and replace it with [the UglifyJS loader](https://www.npmjs.com/package/uglify-loader) instead before running `webpack --json | webpack-bundle-size-analyzer`.\n\nThe reason that using a plugin, rather than a loader, is the recommended approach in Webpack is that compression is better if applied to the whole bundle rather than to individual source files one at a time.\n\n*– taken from the [readme](https://github.com/robertknight/webpack-bundle-size-analyzer/blob/master/README.md) of webpack-bundle-size-analyzer*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignbyadrian%2Fgatsby-plugin-size-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesignbyadrian%2Fgatsby-plugin-size-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignbyadrian%2Fgatsby-plugin-size-analyzer/lists"}