{"versions":{"1.0.0":{"name":"external-remotes-plugin","version":"1.0.0","main":"index.js","repository":{"type":"git","url":"git@github.com:module-federation/external-remotes-plugin.git"},"author":{"name":"Zack Jackson","email":"zackary.l.jackson@gmail.com"},"license":"MIT","dependencies":{"webpack-sources":"^2.2.0"},"peerDependencies":{"webpack":"^5"},"description":"**Host webpack.config** ```js const config = { ...otherConfigs plugins: [ new ModuleFederationPlugin({ name: \"app1\", remotes: { app2: \"app2@[window.app2Url]/remoteEntry.js\" } }). new ExternalTemplateRemotesPlugin(), ] } ```","licenseText":"MIT License\n\nCopyright (c) 2021 Module Federation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"external-remotes-plugin@1.0.0","dist":{"shasum":"2ad8ecad6cba28f6e0fd7bccf8536aeda1297b20","size":2290,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/external-remotes-plugin/-/external-remotes-plugin-1.0.0.tgz","integrity":"sha512-19cfGfzmPMXkRNpyqOHgndNB07vjk1G1V7IuyixBw8Z1QTc/IOhINy9TbWzDRPTmj64e3STTI1MJE0gI58p7YA=="},"_npmUser":{"name":"anonymous","email":"zackary.l.jackson@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"zackary.l.jackson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/external-remotes-plugin_1.0.0_1623191961252_0.1901152383162179"},"_hasShrinkwrap":false,"publish_time":1623191961375,"_cnpm_publish_time":1623191961375,"_cnpmcore_publish_time":"2021-12-17T13:08:53.446Z","contributors":[]}},"dist-tags":{"latest":"1.0.0"},"name":"external-remotes-plugin","time":{"created":"2022-01-27T12:21:50.183Z","modified":"2023-07-30T19:09:15.248Z","1.0.0":"2021-06-08T22:39:21.375Z"},"readme":"# external-remotes-plugin\n\n**Host webpack.config**\n```js\nconst config = {\n   ...otherConfigs\n  plugins: [\n    new ModuleFederationPlugin({\n      name: \"app1\",\n      remotes: {\n        app2: \"app2@[window.app2Url]/remoteEntry.js\"\n      }\n    }).\n    new ExternalTemplateRemotesPlugin(),\n  ]\n}\n```\n\nor\n\n```js\nplugins: [\n    new ModuleFederationPlugin({\n        name: 'my-app',\n        remotes: {\n            'my-remote-1': 'my-remote-1@[window.remote-1-domain]/remoteEntry.js?[getRandomString()]',\n            ...\n        },\n        shared: {...}\n    }),\n    new ExternalTemplateRemotesPlugin(), //no parameter,\n]\n```\n\n**Host (app1) source somewhere before loading main entry file**\n```js\nwindow.app2Url = \"//localhost:3002\"; // Whatever the url/logic to determine your remote module is\n\nimport(\"./bootstrap\");\n```\n\nWorking example is also available in this PR: https://github.com/module-federation/module-federation-examples/pull/557.\n\n**Update:** the PR was merged a example can be found under [advanced-api/dynamic-remotes-synchronous-imports](https://github.com/module-federation/module-federation-examples/tree/d5cf265c2d4fd040797cbae806badd8267ad5b8f/advanced-api/dynamic-remotes-synchronous-imports)","users":{}}