{"id":19290508,"url":"https://github.com/jacob-ebey/webpack-federated-stats-plugin","last_synced_at":"2025-04-22T05:32:28.046Z","repository":{"id":40350485,"uuid":"317624334","full_name":"jacob-ebey/webpack-federated-stats-plugin","owner":"jacob-ebey","description":"Write out relevant federation stats to a file for further consumption.","archived":false,"fork":false,"pushed_at":"2022-09-29T16:03:18.000Z","size":65,"stargazers_count":17,"open_issues_count":2,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-01T20:23:35.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacob-ebey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-01T17:56:23.000Z","updated_at":"2022-10-26T02:11:38.000Z","dependencies_parsed_at":"2023-01-17T16:45:49.639Z","dependency_job_id":null,"html_url":"https://github.com/jacob-ebey/webpack-federated-stats-plugin","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/jacob-ebey%2Fwebpack-federated-stats-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fwebpack-federated-stats-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fwebpack-federated-stats-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fwebpack-federated-stats-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacob-ebey","download_url":"https://codeload.github.com/jacob-ebey/webpack-federated-stats-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249938620,"owners_count":21348544,"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":[],"created_at":"2024-11-09T22:19:28.249Z","updated_at":"2025-04-22T05:32:27.693Z","avatar_url":"https://github.com/jacob-ebey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-federated-stats-plugin\n\nThis plugin will ingest the webpack stats object, process / transform the object and write out relevant federation stats to a file for further consumption.\n\nThe most common use case is building a hashed bundle and wanting to programmatically refer to the correct bundle path in your Node.js server.\n\n## Install\n\n```bash\n\u003e npm i --save-dev webpack-federated-stats-plugin\n```\n\n## Usage\n\n```javascript\nconst FederatedStatsPlugin = require(\"webpack-federated-stats-plugin\");\n\nmodule.exports = {\n  plugins: [\n    new FederatedStatsPlugin({\n      filename: \"federation-stats.json\",\n    }),\n  ],\n};\n```\n\n## Example Output\n\n```json\n{\n  \"sharedModules\": [\n    {\n      \"chunks\": [\n        \"http://localhost:5000/client-bundle/node_modules_preact_hooks_dist_hooks_module_js-_41171.js\"\n      ],\n      \"provides\": [\n        {\n          \"shareScope\": \"default\",\n          \"shareKey\": \"preact/hooks\",\n          \"requiredVersion\": \"^10.5.7\",\n          \"strictVersion\": true,\n          \"singleton\": false,\n          \"eager\": false\n        }\n      ]\n    },\n    {\n      \"chunks\": [\n        \"http://localhost:5000/client-bundle/vendors-node_modules_preact_dist_preact_module_js.js\"\n      ],\n      \"provides\": [\n        {\n          \"shareScope\": \"default\",\n          \"shareKey\": \"preact\",\n          \"requiredVersion\": \"^10.5.7\",\n          \"strictVersion\": true,\n          \"singleton\": false,\n          \"eager\": false\n        }\n      ]\n    },\n    {\n      \"chunks\": [\n        \"http://localhost:5000/client-bundle/vendors-node_modules_universal-router_sync_module_js.js\"\n      ],\n      \"provides\": [\n        {\n          \"shareScope\": \"default\",\n          \"shareKey\": \"universal-router/sync\",\n          \"requiredVersion\": \"^9.0.1\",\n          \"strictVersion\": true,\n          \"singleton\": false,\n          \"eager\": false\n        }\n      ]\n    }\n  ],\n  \"federatedModules\": [\n    {\n      \"remote\": \"preactFrameworkExample\",\n      \"entry\": \"http://localhost:5000/client-bundle/routes.js\",\n      \"remoteModules\": {\n        \"otherRemote/exposedFile\": 893\n      },\n      \"sharedModules\": [\n        {\n          \"chunks\": [\n            \"http://localhost:5000/client-bundle/node_modules_preact_hooks_dist_hooks_module_js-_41171.js\"\n          ],\n          \"provides\": [\n            {\n              \"shareScope\": \"default\",\n              \"shareKey\": \"preact/hooks\",\n              \"requiredVersion\": \"^10.5.7\",\n              \"strictVersion\": true,\n              \"singleton\": false,\n              \"eager\": false\n            }\n          ]\n        },\n        {\n          \"chunks\": [\n            \"http://localhost:5000/client-bundle/vendors-node_modules_preact_dist_preact_module_js.js\"\n          ],\n          \"provides\": [\n            {\n              \"shareScope\": \"default\",\n              \"shareKey\": \"preact\",\n              \"requiredVersion\": \"^10.5.7\",\n              \"strictVersion\": true,\n              \"singleton\": false,\n              \"eager\": false\n            }\n          ]\n        },\n        {\n          \"chunks\": [\n            \"http://localhost:5000/client-bundle/vendors-node_modules_universal-router_sync_module_js.js\"\n          ],\n          \"provides\": [\n            {\n              \"shareScope\": \"default\",\n              \"shareKey\": \"universal-router/sync\",\n              \"requiredVersion\": \"^9.0.1\",\n              \"strictVersion\": true,\n              \"singleton\": false,\n              \"eager\": false\n            }\n          ]\n        }\n      ],\n      \"exposes\": {\n        \"./src/routes/About.tsx\": [\n          {\n            \"chunks\": [\n              \"http://localhost:5000/client-bundle/src_routes_About_tsx.css\",\n              \"http://localhost:5000/client-bundle/src_routes_About_tsx.js\"\n            ],\n            \"sharedModules\": [\n              {\n                \"chunks\": [\n                  \"http://localhost:5000/client-bundle/vendors-node_modules_preact_dist_preact_module_js.js\"\n                ],\n                \"provides\": [\n                  {\n                    \"shareScope\": \"default\",\n                    \"shareKey\": \"preact\",\n                    \"requiredVersion\": \"^10.5.7\",\n                    \"strictVersion\": true,\n                    \"singleton\": false,\n                    \"eager\": false\n                  }\n                ]\n              }\n            ]\n          }\n        ],\n        \"./src/routes/Home.tsx\": [\n          {\n            \"chunks\": [\n              \"http://localhost:5000/client-bundle/src_routes_Home_tsx.css\",\n              \"http://localhost:5000/client-bundle/src_routes_Home_tsx.js\"\n            ],\n            \"sharedModules\": [\n              {\n                \"chunks\": [\n                  \"http://localhost:5000/client-bundle/vendors-node_modules_preact_dist_preact_module_js.js\"\n                ],\n                \"provides\": [\n                  {\n                    \"shareScope\": \"default\",\n                    \"shareKey\": \"preact\",\n                    \"requiredVersion\": \"^10.5.7\",\n                    \"strictVersion\": true,\n                    \"singleton\": false,\n                    \"eager\": false\n                  }\n                ]\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-ebey%2Fwebpack-federated-stats-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacob-ebey%2Fwebpack-federated-stats-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-ebey%2Fwebpack-federated-stats-plugin/lists"}