{"id":19290732,"url":"https://github.com/jacob-ebey/esbuild-federation-share-scope","last_synced_at":"2026-03-10T20:35:40.050Z","repository":{"id":43184623,"uuid":"379703720","full_name":"jacob-ebey/esbuild-federation-share-scope","owner":"jacob-ebey","description":"Enables federation share scope for interop with Webpack 5 Module Federation containers.","archived":false,"fork":false,"pushed_at":"2021-08-02T19:04:22.000Z","size":6,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-22T07:01:46.545Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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":"2021-06-23T19:02:46.000Z","updated_at":"2024-02-21T18:18:38.000Z","dependencies_parsed_at":"2022-08-29T08:30:27.437Z","dependency_job_id":null,"html_url":"https://github.com/jacob-ebey/esbuild-federation-share-scope","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacob-ebey/esbuild-federation-share-scope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fesbuild-federation-share-scope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fesbuild-federation-share-scope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fesbuild-federation-share-scope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fesbuild-federation-share-scope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacob-ebey","download_url":"https://codeload.github.com/jacob-ebey/esbuild-federation-share-scope/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ebey%2Fesbuild-federation-share-scope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30352899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:21:47.439Z","updated_at":"2026-03-10T20:35:40.031Z","avatar_url":"https://github.com/jacob-ebey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esbuild-federation-share-scope\n\nEnables federation share scope for interop with Webpack 5 Module Federation containers. A full example can be found here: https://github.com/jacob-ebey/esbuild-federation-example.\n\n## Usage\n\nInstall https://www.npmjs.com/package/esbuild-federation-share-scope\n\n```\nnpm i -D esbuild-federation-share-scope\n```\n\nBundler configuration:\n\n```js\nesbuild.build({\n  // ... your usual config\n  plugins: [\n    federationShareScopePlugin(process.cwd(), {\n      shared: [\"react\"],\n      // OR:\n      // shared: {\n      //   \"react\": {\n      //     shareKey: \"react\",\n      //     shareScope: [\"default\"],\n      //     version: \"17.0.0\"\n      //   }\n      // }\n    }),\n  ],\n});\n```\n\nAccess to share scope:\n\n```js\n// Effectively __webpack_init_sharing__, __webpack_share_scopes__ respectively\nimport { initSharing, shareScopes } from \"@runtime/federation\";\n\n// external webpack built federation container\nconst container = window[remote];\n\n// initialize share scope\ninitSharing(\"default\")\n  // initialize the container\n  .then(() =\u003e container.init(shareScopes[shareScope]))\n  // get an exposed module\n  .then(() =\u003e container.get(\"./exposed\"))\n  // run the module factory to get the module value\n  .then(factory =\u003e factory())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-ebey%2Fesbuild-federation-share-scope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacob-ebey%2Fesbuild-federation-share-scope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-ebey%2Fesbuild-federation-share-scope/lists"}