{"id":15193944,"url":"https://github.com/retailify/retailify-webpack-stats","last_synced_at":"2025-10-02T08:31:22.261Z","repository":{"id":57355193,"uuid":"99698209","full_name":"retailify/retailify-webpack-stats","owner":"retailify","description":"This is a clone of webpack-bundle-tracker for our docker containers with custom paths","archived":true,"fork":false,"pushed_at":"2017-08-11T18:01:10.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T01:39:50.789Z","etag":null,"topics":["webpack-stats","webpack2"],"latest_commit_sha":null,"homepage":"","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/retailify.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}},"created_at":"2017-08-08T13:50:59.000Z","updated_at":"2023-01-28T10:19:01.000Z","dependencies_parsed_at":"2022-09-09T11:00:40.686Z","dependency_job_id":null,"html_url":"https://github.com/retailify/retailify-webpack-stats","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailify%2Fretailify-webpack-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailify%2Fretailify-webpack-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailify%2Fretailify-webpack-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailify%2Fretailify-webpack-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retailify","download_url":"https://codeload.github.com/retailify/retailify-webpack-stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234957860,"owners_count":18913362,"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":["webpack-stats","webpack2"],"created_at":"2024-09-27T22:20:24.470Z","updated_at":"2025-10-02T08:31:21.909Z","avatar_url":"https://github.com/retailify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# retailify-webpack-stats\n\nThis is an extended version of [webpack-bundle-tracker](https://github.com/ezhome/webpack-bundle-tracker) and we are using it as drop in replacement for our daily use. \n\n**Why we've copied it from the original place?**\n\nCause there a few pull request, that are not integrated at the time of writing and therefore we've decided to make a copy.\n\n**How we are using it?**\n\nWe are using [webpack-bundler](https://github.com/webpack/webpack) in a django docker environment, so we had to replace the generated path in webpack-stats.json with the docker app mount point (e.g. /usr/src/app) each time we are building the container.\n\n**What next?**\n\nOur intention is to:\n\n* write more tests to get a good coverage and test it via circleci or travis\n\n* read RETAILIFY_WEBPACK_STATS_ABSPATH environment variable. (Set the absolutePath via the (docker) env)\n\n* integrate and test: [Adds trackAssets option to plugin](https://github.com/ezhome/webpack-bundle-tracker/pull/24)\n\n\n## Install\n\n```bash\nnpm install --save-dev retailify-webpack-stats\n```\n\n\n## Usage\n\n### Precedence Rule\n\nIf the absolutePath is set, the path option is ignored.\n\n```javascript\nvar BundleTracker  = require('retailify-webpack-stats');\nmodule.exports = {\n        context: __dirname,\n    entry: {\n      app: ['./app']\n    },\n\n    output: {\n        path: require(\"path\").resolve('./assets/bundles/'),\n        filename: \"[name]-[hash].js\",\n        publicPath: 'http://localhost:3000/assets/bundles/',\n    },\n\n    plugins: [\n      new BundleTracker({\n        absolutePath: '/usr/src/app',\n        filename: './assets/webpack-stats.json',\n        indent: 2\n      })\n    ]\n}\n```\n\n`./assets/webpack-stats.json` will look like,\n\n```json\n{\n  \"status\":\"done\",\n  \"chunks\":{\n   \"app\":[{\n      \"name\":\"app-0828904584990b611fb8.js\",\n      \"publicPath\":\"http://localhost:3000/assets/bundles/app-0828904584990b611fb8.js\",\n      \"path\":\"/home/user/project-root/assets/bundles/app-0828904584990b611fb8.js\"\n    }]\n  }\n}\n```\n\nIn case webpack is still compiling, it'll look like,\n\n\n```json\n{\n  \"status\":\"compiling\",\n}\n```\n\nAnd errors will look like,\n```json\n{\n  \"status\": \"error\",\n  \"file\": \"/path/to/file/that/caused/the/error\",\n  \"error\": \"ErrorName\",\n  \"message\": \"ErrorMessage\"\n}\n```\n\n`ErrorMessage` shows the line and column that caused the error.\n\n\n\nAnd in case `logTime` option is set to `true`, the output will look like,\n```\n{\n  \"status\":\"done\",\n  \"chunks\":{\n   \"app\":[{\n      \"name\":\"app-0828904584990b611fb8.js\",\n      \"publicPath\":\"http://localhost:3000/assets/bundles/app-0828904584990b611fb8.js\",\n      \"path\":\"/usr/src/app/assets/bundles/app-0828904584990b611fb8.js\"\n    }]\n  },\n  \"startTime\":1440535322138,\n  \"endTime\":1440535326804\n}\n```\n\nBy default, the output JSON will not be indented. To increase readability, you can use the `indent`\noption to make the output legible. By default it is off. The value that is set here will be directly\npassed to the `space` parameter in `JSON.stringify`. indent can be a number (up to 10) or whitespaces. More information can be found here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n\n## Support\n\nIf you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on Github.\n\n## Authors\n\n* [Owais Lone](https://github.com/owais) Thank you for this piece of code!\n\n* [Thomas Meitz](https://github.com/retailify)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailify%2Fretailify-webpack-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretailify%2Fretailify-webpack-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailify%2Fretailify-webpack-stats/lists"}