{"id":15626366,"url":"https://github.com/scriptedalchemy/webpack-external-import","last_synced_at":"2025-10-07T16:51:50.478Z","repository":{"id":34635590,"uuid":"179774002","full_name":"ScriptedAlchemy/webpack-external-import","owner":"ScriptedAlchemy","description":"Dynamically import modules from other webpack bundles. Painless code sharing between separate apps","archived":false,"fork":false,"pushed_at":"2025-09-26T12:07:27.000Z","size":4869,"stargazers_count":413,"open_issues_count":70,"forks_count":42,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-09-26T14:19:55.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScriptedAlchemy.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-06T01:00:26.000Z","updated_at":"2025-09-01T01:57:48.000Z","dependencies_parsed_at":"2023-01-15T08:15:51.395Z","dependency_job_id":"ecf8bde7-191c-412a-8da6-bb5e69dee753","html_url":"https://github.com/ScriptedAlchemy/webpack-external-import","commit_stats":{"total_commits":196,"total_committers":13,"mean_commits":"15.076923076923077","dds":0.2142857142857143,"last_synced_commit":"272b92a55de1e1669fa3770ced273fca16b17c41"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/ScriptedAlchemy/webpack-external-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScriptedAlchemy%2Fwebpack-external-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScriptedAlchemy%2Fwebpack-external-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScriptedAlchemy%2Fwebpack-external-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScriptedAlchemy%2Fwebpack-external-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScriptedAlchemy","download_url":"https://codeload.github.com/ScriptedAlchemy/webpack-external-import/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScriptedAlchemy%2Fwebpack-external-import/sbom","scorecard":{"id":126929,"data":{"date":"2025-08-11","repo":{"name":"github.com/ScriptedAlchemy/webpack-external-import","commit":"272b92a55de1e1669fa3770ced273fca16b17c41"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 7/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"165 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-22h7-7wwg-qmgg","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-4x6g-3cmx-w76r","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-9j49-mfvp-vmhm","Warn: Project is vulnerable to: GHSA-3wcq-x3mq-6r9p","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-6h5x-7c5m-7cr7","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-6x33-pw7p-hmpq","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-8g7p-74h8-hg48","Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q","Warn: Project is vulnerable to: GHSA-jg8v-48h5-wgxg","Warn: Project is vulnerable to: GHSA-36fh-84j7-cv5h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-r6rj-9ch6-g264","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-6xwr-q98w-rvg7","Warn: Project is vulnerable to: GHSA-4c7m-wxvm-r7gc","Warn: Project is vulnerable to: GHSA-pch5-whg9-qr2r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-93f3-23rq-pjfp","Warn: Project is vulnerable to: GHSA-jmqm-f2gx-4fjv","Warn: Project is vulnerable to: GHSA-pw54-mh39-w3hc","Warn: Project is vulnerable to: GHSA-xgh6-85xh-479p","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-r2j6-p67h-q639","Warn: Project is vulnerable to: GHSA-x2pg-mjhr-2m5x","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-hpqj-7cj6-hfj8","Warn: Project is vulnerable to: GHSA-4vrv-93c7-m92j","Warn: Project is vulnerable to: GHSA-6hwc-9h8r-3vmf","Warn: Project is vulnerable to: GHSA-qqqw-gm93-qf6m","Warn: Project is vulnerable to: GHSA-69f9-h8f9-7vjf","Warn: Project is vulnerable to: GHSA-c9g6-9335-x697","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-xc7v-wxcw-j472","Warn: Project is vulnerable to: GHSA-9m6j-fcg5-2442","Warn: Project is vulnerable to: GHSA-hh27-ffr2-f2jc","Warn: Project is vulnerable to: GHSA-rqff-837h-mm52","Warn: Project is vulnerable to: GHSA-8v38-pw62-9cw2","Warn: Project is vulnerable to: GHSA-hgjh-723h-mx2j","Warn: Project is vulnerable to: GHSA-jf5r-8hm2-f872","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T04:11:10.723Z","repository_id":34635590,"created_at":"2025-08-16T04:11:10.723Z","updated_at":"2025-08-16T04:11:10.723Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278811847,"owners_count":26050181,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-03T10:12:11.669Z","updated_at":"2025-10-07T16:51:50.432Z","avatar_url":"https://github.com/ScriptedAlchemy.png","language":"JavaScript","readme":"# Webpack External Import\n\n\u003e **import() other chunks and modules from third parties, or other webpack builds themselves! At runtime!**\n\n## This is now part of Webpack 5 - do not use external-import, read more here: http://module-federation.github.io/\n\n\u003cp align=\"center\"\u003e\n\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n  \u003ca href=\"https://www.npmjs.com/package/webpack-external-import\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/webpack-external-import.svg\" alt=\"Version\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.npmjs.com/package/webpack-external-import\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dt/webpack-external-import.svg\" alt=\"Downloads\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.npmjs.com/package/webpack-external-import\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/webpack-external-import.svg\" alt=\"License\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.npmjs.com/package/webpack-external-import\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/webpack-external-import.svg\" alt=\"License\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"docs/webpack-external-import.png\" width=\"40%\" alt=\"webpack-external-import\" /\u003e\n\u003c/p\u003e\n\n\u003e This project has been rewritten into the Webpack core. Its far more stable and available on npm webpack@5.0.0-beta.16 https://github.com/webpack/webpack/issues/10352\n\n\u003e ### ⚠️ This project no longer under development as been enhanced in the webpack 5 core ⚠️\n\u003e ### See the examples on module federation in webpack 5\n\n\\*\\*To jump to the _development_ section [click here](#development--debugging)\n\n# Installation\n\n### npm\n\n```sh\nnpm install webpack-external-import --save\n```\n\n### Yarn\n\n```sh\nyarn add webpack-external-import\n```\n\n### Version 2.0!\n\nMajor rewrite which has taken the original concept and built it directly into webpack runtime.\nA big achievement in this release is **tree-shaking support**\n\nIf you want to read me about what this tool does.\n\nRead the following:\n\n- https://link.medium.com/L5zHiwylI3\n- working on more use cases and writing about V2\n\n## Getting Started\n\n1.  Add `webpack-external-import/webpack` to your webpack plugins:\n\n```js\n// techblog.webpack.config.js\nconst URLImportPlugin = require(\"webpack-external-import/webpack\");\n{\n  plugins: [\n    new URLImportPlugin({\n      manifestName: \"website-one\"\n    })\n  ];\n}\n\n// otherblog.webpack.config\nconst URLImportPlugin = require(\"webpack-external-import/webpack\");\n{\n  plugins: [\n    new URLImportPlugin({\n      manifestName: \"website-two\"\n    })\n  ];\n}\n```\n\n2. If you are interleaving webpack bundles, load their manifests somewhere\n\n```js\n// index.js\nimport { corsImport } from \"webpack-external-import\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport App from \"./App.jsx\";\n\n// using Date.now() for cache busting the file. It should only less than 2kb\ncorsImport(`http://localhost:3002/importManifest.js?${Date.now()}`).then(() =\u003e {\n  ReactDOM.render(\u003cApp /\u003e, document.getElementById(\"app\"));\n});\n\n// you could also use native imports\n\nimport(\n  /* webpackIgnore:true */ `http://localhost:3002/importManifest.js?${Date.now()}`\n).then(() =\u003e {\n  ReactDOM.render(\u003cApp /\u003e, document.getElementById(\"app\"));\n});\n```\n\n## Usage\n\nThis plugin works with any Webpack driven application\n\n#### Vanilla JS\n\nThis assumes a import manifest was loaded somewhere else in the application already.\n\nIf you have not imported manifest then wrap your function in another promise:\n\n```js\ncorsImport(\"http://localhost:3002/importManifest.js\").then(() =\u003e {\n  someFunction();\n});\n```\n\nAs long as the `importManifest` was loaded - this is how it would be used\n`__webpack_require_.interleaved()` expects a module to contain both the module.id and the namespace\n\nThis allows external-import to know where to interleave from.\n`__webpack_require_.interleaved([namespace]/[module.id])`\n\nBelow is an example of interleaving a module from `website-2`\n\n```js\n// import a chunk from another website build with webpack-external-import\n\n__webpack_require__\n  .interleaved(\"website-2/ValidationRules\")\n  .then(validationRules =\u003e {\n    // proceed to use as a you would with a normal require statement\n    validationRules.validateObject(someObject);\n  });\n```\n\n### With JSX\n\n`ExternalComponent` exists for ease of use with React Components and is as SFC using React.Hooks\n\n```js\nimport { ExternalComponent } from \"webpack-external-import\";\nclass SomeComponent extends Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cExternalComponent\n          interleave={__webpack_require__.interleaved(\n            \"website-2/TitleComponent\"\n          )}\n          export=\"Title\"\n          title=\"Some Heading\"\n        /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n## What is the use of `webpack-external-import` ?\n\n- **Load components over the wire** - Pull in components at runtime.\n- **Build leaner micro-frontends (MFE)** -\n  Micro-frontends can share bundle chunks and resources with each other while remaining self-contained, removing needless code duplication.\n- **Split a large, multi-team app into separate deployable chunks while keeping it as one SPA** - Large apps can be split into separate feature bundles that can be deployed independently, reducing deployment bottlenecks.\n- **Manage common js/vendor files automatically.** - Instead of dealing with peer dependencies, externals, or anything else, you can load the dependency from a remote source.\n- **LOSA Style frontend architecture** - Run multiple apps on a single page.\n- **FOSA Style frontend orchestration** - Powerful frontend orchestration, self-organizing application architecture. Many builds act as one\n\n### Advanced Setup - Injecting Webpack modules from another build\n\nUse the webpack plugin to inject webpack modules from another build into your build.\n\n_**Important**: Make sure manifestName_ is unique per webpack build.\nIf you have multiple builds, they all need to have a unique manifestName\n\n**webpack.config.js**\n\n```js\nconst URLImportPlugin = require(\"webpack-external-import/webpack\");\n{\n  plugins: [\n    new URLImportPlugin({\n      manifestName: \"website-one\"\n    })\n  ];\n}\n```\n\n## Mark Files for interleaving\n\nPretend we have two separate apps that each have their _independent_ build. We want to share a module from one of our apps with the other.\n\nTo do this, you must add an `interleave` object to `package.json`.\nThe `interleave` object tells the plugin to make the module accessible through a predictable name.\n\nFor example:\n\n```json\n// website-two package.json\n{\n  \"name\": \"some-package-name\",\n  \"interleave\": {\n    \"src/components/Title/index.js\": \"TitleComponent\",\n    \"src/components/hello-world/index.js\": \"SomeExternalModule\"\n  }\n}\n```\n\n```js\n// website-one App.js\n__webpack_require__\n  .interleaved(\"website-3/TitleComponentWithCSSFile\")\n  .then(TitleComponentWithCSSFile =\u003e \u003cTitleComponentWithCSSFile /\u003e);\n```\n\nThis ensures a easy way for other consumers, teams, engineers to look up what another project or team is willing\nto allow for interleaving\n\n## Working with Webpack Externals\n\nIt's important to follow the instructions below if you are planning to use Webpack externals.\nThis plugin must be installed on all builds - it is intended that the build creating providing external is built by this plugin.\nExternals work best in scenarios where the \"host\" app should supplying dependencies to an interleaved one.\n\n**Providing Externals**\nTo support webpack externals, you will need to use `provideExternals` to specify externals\n\n**Note:** you must use `provideExternals` **instead** of the webpack `externals` option.\n\n```js\nnew URLImportPlugin({\n  provideExternals: {\n    react: \"React\"\n  }\n});\n```\n\n**Consuming Externals**\nTo consume externals, you will need to use `useExternals` to inform webpack that the interleaved app should use the module specified by `provideExternals`\n\n```js\nnew URLImportPlugin({\n  useExternals: {\n    react: \"React\"\n  }\n});\n```\n\n## Full Example\n\n**WEBSITE-ONE**\n\n```js\n// app.js\n\nimport React, { Component } from \"react\";\nimport { ExternalComponent } from \"webpack-external-import\";\nimport HelloWorld from \"./components/goodbye-world\";\nimport \"react-select\";\n\nclass App extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      titleUrl: null,\n      manifestLoaded: false,\n      loaded: false\n    };\n  }\n\n  componentDidMount() {\n    __webpack_require__\n      .interleaved(\"website-3/TitleComponentWithCSSFile\")\n      .then(TitleComponentWithCSSFile =\u003e\n        console.log(TitleComponentWithCSSFile)\n      );\n  }\n\n  renderDynamic = () =\u003e {\n    const { loaded } = this.state;\n    if (!loaded) return null;\n    return __webpack_require__(\"SomeExternalModule\").default();\n  };\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cHelloWorld /\u003e\n\n        \u003cExternalComponent\n          interleave={__webpack_require__.interleaved(\n            \"website-2/TitleComponent\"\n          )}\n          export=\"Title\"\n          module=\"TitleComponent\"\n          title=\"Some Heading\"\n        /\u003e\n\n        \u003cExternalComponent\n          interleave={__webpack_require__.interleaved(\n            \"website-3/TitleComponentWithCSSFile\"\n          )}\n          export=\"Title\"\n          title=\"Title Component With CSS File Import\"\n        /\u003e\n        {this.renderDynamic()}\n      \u003c/div\u003e\n    );\n  }\n}\n\nPromise.all([\n  corsImport(`http://localhost:3002/importManifest.js?${Date.now()}`),\n  corsImport(`http://localhost:3003/importManifest.js?${Date.now()}`)\n]).then(() =\u003e {\n  ReactDOM.render(\u003cApp /\u003e, document.getElementById(\"app\"));\n});\n```\n\n**WEBSITE-TWO**\n\n```json\n// package.json\n\n{\n  \"name\": \"website-two\",\n  \"version\": \"0.0.0-development\",\n  \"author\": \"Zack Jackson \u003czack@ScriptedAlchemy.com\u003e (https://github.com/ScriptedAlchemy)\",\n  \"interleave\": {\n    \"src/components/Title/index.js\": \"TitleComponentWithCSSFile\",\n    \"src/components/Title/style.css\": \"TitleComponentWithCSSFileCSS\",\n    \"src/components/hello-world/index.js\": \"SomeExternalModule\"\n  }\n}\n```\n\n## API:\n\n```js\nmodule.exports = {\n  plugins: [\n    new URLImportPlugin({\n      manifestName: \"website-one\",\n      fileName: \"importManifest.js\",\n      basePath: ``,\n      publicPath: `//localhost:3001/`,\n      writeToFileEmit: false,\n      seed: null,\n      filter: null,\n      debug: true,\n      useExternals: {},\n      provideExternals: {}\n    })\n  ]\n};\n```\n\n### `options.fileName`\n\nType: `String`\u003cbr\u003e\nDefault: `importManifest.js`\n\nThe manifest filename in your output directory.\n\n### `options.publicPath`\n\nType: `String`\nDefault: `output.publicPath`\n\nA path prefix that will be added to values of the manifest.\n\n### `options.basePath`\n\nType: `String`\n\nA path prefix for all keys. Useful for including your output path in the manifest.\n\n### `options.writeToFileEmit`\n\nType: `Boolean`\u003cbr\u003e\nDefault: `false`\n\nIf set to `true` will emit to build folder and memory in combination with `webpack-dev-server`\n\n### `options.seed`\n\nType: `Object`\u003cbr\u003e\nDefault: `{}`\n\nA cache of key/value pairs to used to seed the manifest. This may include a set of [custom key/value](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json) pairs to include in your manifest or may be used to combine manifests across compilations in [multi-compiler mode](https://github.com/webpack/webpack/tree/master/examples/multi-compiler). To combine manifests, pass a shared seed object to each compiler's ManifestPlugin instance.\n\n### `options.filter`\n\nType: `Function(FileDescriptor): Boolean`\n\n### `options.testPath`\n\nType: `Function(Object, FileDescriptor): Object`\u003cbr\u003e\nDefault: `src`\n\nTest resource path to see if plugin should apply transformations\n\n### `options.useExternals`\n\nType: `Object`\u003cbr\u003e\nDefault: `{}`\n\nInforms the webpack treat the following dependencies as externals.\nWorks the same way externals does.\n\n### `options.provideExternals`\n\nType: `Object`\u003cbr\u003e\nDefault: `{}`\n\nInforms webpack to provide the dependencies listed in the object to other apps using `useExternals`\n\n### **ExternalComponent**\n\nReact Component\n\n#### **Props**:\n\n**`src`: string** - a url to a javascript file, note it will need to be built by another webpack build running this plugin\n\n**`interleave`: function** - the `__webpack_require__.interleave()` function, which will return a module\n\n**`export`: string** - The named export to use as a component from the module being imported\n\n### The entry manifest\n\nEach webpack build using the webpack plugin emits a manifest file to the build output directory.\n\nThe manifest allows you to find a chunk that you want, even if the name has been hashed.\n\nBelow is an example of using the manifest.\n\nIn this file, I am importing code from another website/build. My application is loading website two's manifest, which is automatically added to `window.entryManifest` under the `manifestName` I set in the webpack plugin. After that, I'm importing a chunk from website-two, in this case - the chunk is code-split.\n\n```js\ncomponentDidMount() {\n  corsImport('http://localhost:3002/importManifest.js').then(() =\u003e {\n      const Title = __webpack_require__\n        .interleaved(\"website-two/TitleComponent\")\n\n        Title.then(console.log) // =\u003e Module {default: ()=\u003e{}, Title: ()=\u003e{}}\n  });\n}\n```\n\n## DEMO\n\nHow to start using the demo\nIn the _root directory_, run the following\n\n1. run `yarn install`\n2. run `yarn demo` from the root directory\n3. browse to [localhost:3001](http://localhost:3001) and you will see components from two other websites\n\nThis command will install, all dependencies, build the source for the plugin, install the demo dependencies, run all builds and start serving\n\n## Development \u0026 Debugging\n\nHow to start the demo in debug mode, using node --inspect and connecting to a chrome debugger\n\n\u003e This is mainly for debugging the webpack plugin\n\nIn the root directory, run the following\n\n1. `yarn install`\n2. `yarn demo:debug` from the root directory\n3. browse to [localhost:3001](http://localhost:3001)\n\n**Note:** _[localhost:3001](http://localhost:3001) is the \"consumer app, while the other is the provider app\". Both apps work independently and you should check both of them out (they are extremely basic)_\n\nOpen chrome dev tools and you should see the box highlighted below appear, click on it to connect to the webpack debugger\n![GitHub Logo](/docs/inspect.png)\n\n### Logging\n\nThe default compilation removes console log statements via `babel-plugin-transform-remove-console`, which is run when `BABEL_ENV=production` (default). To compile a version with logging enabled, run `yarn compile` directly.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptedalchemy%2Fwebpack-external-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptedalchemy%2Fwebpack-external-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptedalchemy%2Fwebpack-external-import/lists"}