{"id":15690764,"url":"https://github.com/perry-mitchell/distributed-webpack","last_synced_at":"2025-10-09T21:36:45.902Z","repository":{"id":57213096,"uuid":"82190337","full_name":"perry-mitchell/distributed-webpack","owner":"perry-mitchell","description":"Run large webpack builds on multiple machines","archived":false,"fork":false,"pushed_at":"2017-05-08T08:44:31.000Z","size":37,"stargazers_count":8,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T04:41:57.362Z","etag":null,"topics":["build","build-tool","distributed","distributed-builds","performance","webpack"],"latest_commit_sha":null,"homepage":null,"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/perry-mitchell.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":"2017-02-16T14:38:37.000Z","updated_at":"2021-10-22T04:21:54.000Z","dependencies_parsed_at":"2022-08-24T21:41:51.673Z","dependency_job_id":null,"html_url":"https://github.com/perry-mitchell/distributed-webpack","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/perry-mitchell/distributed-webpack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fdistributed-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fdistributed-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fdistributed-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fdistributed-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perry-mitchell","download_url":"https://codeload.github.com/perry-mitchell/distributed-webpack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perry-mitchell%2Fdistributed-webpack/sbom","scorecard":{"id":728083,"data":{"date":"2025-08-11","repo":{"name":"github.com/perry-mitchell/distributed-webpack","commit":"654b7ebb13da6ca214073e73dd0e8c6f52bcd212"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 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":-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":"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":"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":"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":"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":"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":"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 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-22T13:29:24.249Z","repository_id":57213096,"created_at":"2025-08-22T13:29:24.249Z","updated_at":"2025-08-22T13:29:24.249Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002055,"owners_count":26083286,"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-09T02:00:07.460Z","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":["build","build-tool","distributed","distributed-builds","performance","webpack"],"created_at":"2024-10-03T18:15:38.606Z","updated_at":"2025-10-09T21:36:45.887Z","avatar_url":"https://github.com/perry-mitchell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Distributed Webpack\nRun large webpack builds on multiple machines\n\n[![npm version](https://badge.fury.io/js/distributed-webpack.svg)](https://www.npmjs.com/package/distributed-webpack)\n\n## About\nMuch like [parallel-webpack](https://github.com/trivago/parallel-webpack), **distributed-webpack** is designed to make building _multiple_ configurations faster and more efficient. This project was born out of the requirement to build _hundreds_ of configurations (of scripts with sizes between 1-2mb) where tools like parallel-webpack and [happypack](https://github.com/amireh/happypack) where simply not enough (though they help enormously when compared with standard webpack execution).\n\nThis library is designed to allow the execution of webpack configurations on multiple machines and allows, via configuration, the specification of the exact command (and parameters) to execute. This means that tools like parallel-webpack can be used in combination with distributed-webpack to achieve even greater parallelism.\n\nThis library is currently **highly experimental** and should be used with caution on production builds. distributed-webpack only supports Mac and Linux.\n\n## Installation\nThis library is a build tool, so you should (in most cases) save it as a dev dependency:\n\n```bash\nnpm install distributed-webpack --save-dev\n```\n\nThis library has webpack has a **peer dependency**, so you should definitely have that already installed. distributed-webpack reinstalls all modules specified in `package.json` on the target machines, so webpack (and any other required build tools) should be specified in `package.json` for it to be installed remotely.\n\n## Usage\ndistributed-webpack provides an executable called `distwp`, which is available in `./node_modules/.bin/`. It can be used in npm scripts to easily initiate building:\n\n```json\n{\n    \"name\": \"myProject\",\n    \"scripts\": {\n        \"build\": \"distwp build\"\n    }\n}\n```\n\nBecause distributed-webpack needs to process the webpack configuration **locally** before building remotely (to calculate work load), environment variables that are received by distributed-webpack **are also received by webpack itself**. When building remotely, however, you must provide the environment to webpack or major inconsistencies or errors may occur.\n\n## Configuration\nConfiguration of distributed-webpack is made by providing a `dist.webpack.config.js` file in the root directory of the project, alongside a `webpack.config.js` file for regular webpack execution. This new config file will house the definitions of the nodes (to perform building) and their weight (how much of the work will be performed on the node).\n\nWithin the configuration file, you should export a single object:\n\n```javascript\nmodule.exports = {\n\n    nodes: [\n\n        {\n            nodeType: \"local\",\n            weight: 50,\n            workingDir: \"/home/user/Temp/dist-wp-build\",\n            artifacts: [\n                {\n                    remote: \"/home/user/Temp/dist-wp-build/dist/*.js\",\n                    local: \"/home/user/work/project/dist/\"\n                }\n            ]\n        }\n\n    ],\n\n    webpack: {\n        buildCommand: \"./node_modules/.bin/webpack\",\n        buildArgs: []\n    },\n    \n    verify: {\n        outputDirectory: \"/home/user/work/project/dist/\",\n        filenameRegex: /\\.js$/\n    }\n\n};\n```\n\n### Options\n\n#### nodes\nAn array of [node configurations](#node-configurations).\n\n#### webpack\nWebpack-specific configuration (for running on remotes).\n\n#### verify\nAn optional verification configuration for post-build.\n\n##### verify.outputDirectory\nOutput directory of retrieved scripts/files to verify.\n\n##### verify.filenameRegex\nOptional regular expression of files to check - matches the `output.filename` property from each webpack configuration and verifies only those that match. This is useful for only verifying those assets built remotely.\n\n### Node configurations\nNodes are where the work is done, and can be one of two types: `local` or `ssh`.\n\n#### node.nodeType\nA **required** field denoting the type of node. Can be either `local` or `ssh`.\n\n#### node.weight\nA **required** integer denoting the amount of work that should be done on this node compared to others. Weights can be in any range, and are compared to one another. For example, if a node has a weight of `100` and another of `10`, the first will get 10 times the work of the second.\n\n#### node.workingDir\nA **required** string holding the _remote_ working directory (where to copy the project to). Must be absolute.\n\n#### node.host\nThe IP address or hostname of the remote machine to connect to. Required for `ssh` node types.\n\n#### node.username\nThe SSH username to connect to the remote machine. Required for `ssh` node types.\n\n#### node.password\nThe SSH password to authenticate the user with on the remote machine. May be required for `ssh` node types if `privateKey` is not specified.\n\n#### node.privateKey\nThe SSH private key to use for authentication on the remote machine. Can either be an absolute path to the key or a string of the key itself.\n\n#### node.artifacts\nAn array of built artifacts to be retrieved after building. This is an array of objects that resemble the following:\n\n```javascript\n{\n    remote: \"/home/user/Temp/dist-wp-build/dist/*.js\",\n    local: \"/home/user/work/project/dist/\"\n}\n```\n\nAssets matching the `remote` pattern are copied from the remote source into the `local` directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperry-mitchell%2Fdistributed-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperry-mitchell%2Fdistributed-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperry-mitchell%2Fdistributed-webpack/lists"}