{"id":43821428,"url":"https://github.com/abereghici/webpack-modern-build-plugin","last_synced_at":"2026-02-06T01:58:30.015Z","repository":{"id":46952690,"uuid":"316740386","full_name":"abereghici/webpack-modern-build-plugin","owner":"abereghici","description":"Plugin that creates module / nomodule scripts","archived":false,"fork":false,"pushed_at":"2021-10-08T07:31:52.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-18T12:55:11.136Z","etag":null,"topics":["es2015-modules","es6","es6-modules","hacktoberfest","legacy","modern","module","nomodule","webpack","webpack-plugin"],"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/abereghici.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":"2020-11-28T13:30:43.000Z","updated_at":"2023-10-15T23:13:47.000Z","dependencies_parsed_at":"2022-09-02T20:12:20.032Z","dependency_job_id":null,"html_url":"https://github.com/abereghici/webpack-modern-build-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/abereghici/webpack-modern-build-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abereghici%2Fwebpack-modern-build-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abereghici%2Fwebpack-modern-build-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abereghici%2Fwebpack-modern-build-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abereghici%2Fwebpack-modern-build-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abereghici","download_url":"https://codeload.github.com/abereghici/webpack-modern-build-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abereghici%2Fwebpack-modern-build-plugin/sbom","scorecard":{"id":160530,"data":{"date":"2025-08-11","repo":{"name":"github.com/abereghici/webpack-modern-build-plugin","commit":"6351b794ce363963c259ec540c18a0c0ab598de0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/codeql-analysis.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/validate.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/validate.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/validate.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/validate.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/validate.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/abereghici/webpack-modern-build-plugin/validate.yml/main?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"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":"Code-Review","score":0,"reason":"Found 1/15 approved changesets -- score normalized to 0","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/validate.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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: MIT 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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 6 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"}}]},"last_synced_at":"2025-08-16T13:16:57.560Z","repository_id":46952690,"created_at":"2025-08-16T13:16:57.560Z","updated_at":"2025-08-16T13:16:57.560Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29145560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T01:13:33.096Z","status":"ssl_error","status_checked_at":"2026-02-06T01:11:47.313Z","response_time":65,"last_error":"SSL_read: 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":["es2015-modules","es6","es6-modules","hacktoberfest","legacy","modern","module","nomodule","webpack","webpack-plugin"],"created_at":"2026-02-06T01:58:29.249Z","updated_at":"2026-02-06T01:58:30.000Z","avatar_url":"https://github.com/abereghici.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eWebpack Modern Build Plugin\u003c/h1\u003e\n  \u003cp\u003ePlugin that creates module/nomodule scripts.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\n```bash\n  npm i --save-dev webpack-modern-build-plugin\n```\n\n```bash\n  yarn add --dev webpack-modern-build-plugin\n```\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\nThe plugin generates module/nomodule scripts and relies on\n[html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin). This\nplugin expects to return two configurations in your webpack - legacy and modern.\nOne of those values should be passed as mode option to the plugin in both\nconfigurations.\n\nExample of `webpack` config:\n\n**webpack.config.js**\n\n```js\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\nconst WebpackModernBuildPlugin = require('webpack-modern-build-plugin')\n\nmodule.exports = [\n  {\n    entry: 'index.js',\n    output: {\n      path: __dirname + '/dist',\n      filename: 'bundle.js',\n    },\n    plugins: [\n      new HtmlWebpackPlugin(),\n      new WebpackModernBuildPlugin({\n        mode: 'modern',\n      }),\n    ],\n  },\n  {\n    entry: 'index.js',\n    output: {\n      path: __dirname + '/dist',\n      filename: 'es5.bundle.js',\n    },\n    plugins: [\n      new HtmlWebpackPlugin(),\n      new WebpackModernBuildPlugin({\n        mode: 'legacy',\n      }),\n    ],\n  },\n]\n```\n\nThis will generate a file `dist/index.html` containing the following\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eWebpack App\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript src=\"bundle.js\" type=\"module\" crossorigin=\"anonymous\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      ;(function () {\n        var d = document\n        var c = d.createElement('script')\n        if (!('noModule' in c) \u0026\u0026 'onbeforeload' in c) {\n          var s = !1\n          d.addEventListener(\n            'beforeload',\n            function (e) {\n              if (e.target === c) {\n                s = !0\n              } else if (!e.target.hasAttribute('nomodule') || !s) {\n                return\n              }\n              e.preventDefault()\n            },\n            !0,\n          )\n          c.type = 'module'\n          c.src = '.'\n          d.head.appendChild(c)\n          c.remove()\n        }\n      })()\n    \u003c/script\u003e\n    \u003cscript src=\"es5.bundle.js\" nomodule\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003ch2 align=\"center\"\u003eExample\u003c/h2\u003e\nHere you can find the implementation of differential serving using this plugin\nhttps://github.com/abereghici/diff_serving\n\nThe script in the middle between type=\"module\" and nomodule is for Safari 10.1.\nThis version supports modules, but does not support the `nomodule` attribute -\nit will load \"script nomodule\" anyway. This snippet solve this problem, but only\nfor script tags that load external code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabereghici%2Fwebpack-modern-build-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabereghici%2Fwebpack-modern-build-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabereghici%2Fwebpack-modern-build-plugin/lists"}