{"id":15018968,"url":"https://github.com/soundcloud/split-by-name-webpack-plugin","last_synced_at":"2025-10-19T16:32:11.746Z","repository":{"id":20269032,"uuid":"23542094","full_name":"soundcloud/split-by-name-webpack-plugin","owner":"soundcloud","description":"Split a Webpack entry bundle into any number of arbitrarily defined smaller bundles","archived":false,"fork":false,"pushed_at":"2023-04-09T20:55:27.000Z","size":168,"stargazers_count":81,"open_issues_count":5,"forks_count":11,"subscribers_count":171,"default_branch":"master","last_synced_at":"2025-01-29T21:23:47.403Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soundcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2014-09-01T12:43:09.000Z","updated_at":"2024-09-13T07:09:10.000Z","dependencies_parsed_at":"2024-06-21T14:15:18.179Z","dependency_job_id":"8dee6b7f-5298-4411-8653-e00134b45b8a","html_url":"https://github.com/soundcloud/split-by-name-webpack-plugin","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.33333333333333337","last_synced_commit":"63296e23cea6619986735d34053140a5992b475d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundcloud%2Fsplit-by-name-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundcloud%2Fsplit-by-name-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundcloud%2Fsplit-by-name-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundcloud%2Fsplit-by-name-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soundcloud","download_url":"https://codeload.github.com/soundcloud/split-by-name-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237172116,"owners_count":19266614,"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","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-09-24T19:52:41.158Z","updated_at":"2025-10-19T16:32:11.463Z","avatar_url":"https://github.com/soundcloud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Split By Name Webpack Plugin\n\nThis plugin will split your entry bundle into any number of arbitrarily defined smaller bundles.\n\n### Why?\n\n- Browsers will open [between 6 and 10][browserscope] parallel connections to a single host. By splitting up one large\nfile (your main bundle) into a number of smaller ones, you can leverage these connections to download the files\n[faster][stevesouders].\n- It's likely that you will have some third party scripts which you change infrequently. By putting these into their own\nbundle, then if they haven't changed between builds, your users may still be able to use the cached version from before.\n\n### How?\n\nConfiguration of the plugin is simple. You instantiate the plugin with a single option: `buckets` which should be an\narray of objects, each containing the keys `name` and `regex`. Any modules which are in your entry chunk which match the\nbucket's regex (first matching bucket is used), are then moved to a new chunk with the given name.\n\nCreating a 'catch-all' bucket is not necessary: anything which doesn't match one of the defined buckets will be left in\nthe original chunk.\n\n### Example\n\n```js\nvar SplitByNamePlugin = require('split-by-name-webpack-plugin');\nmodule.exports = {\n  entry: {\n    app: 'app.js'\n  },\n  output: {\n    path: __dirname + '/public',\n    filename: \"[name]-[chunkhash].js\",\n    chunkFilename: \"[name]-[chunkhash].js\"\n  },\n  plugins: [\n    new SplitByNamePlugin({\n      buckets: [{\n        name: 'vendor',\n        regex: /vendor\\//\n      }, {\n        name: 'views',\n        regex: /views\\//\n      }]\n    })\n  ]\n};\n```\n\nAn an example structure of modules included in the entry chunk:\n\n```\n/lib\n    /views\n        /list.js\n        /grid.js\n    /url.js\n/vendor\n    /jquery.js\n    /backbone.js\n/views\n    /home.js\n    /banner.js\n/app.js\n```\n\nThe output would be three files:\n\n- `app-[hash].js`, containing:\n    - `app.js`\n    - `lib/url.js`\n- `vendor-[hash].js`, containing:\n    - `vendor/jquery.js`\n    - `vendor/backbone.js`\n- `views-[hash].js`, containing:\n    - `lib/views/list.js`\n    - `lib/views/grid.js`\n    - `views/home.js`\n    - `views/banner.js`\n\n[browserscope]: http://www.browserscope.org/?category=network\u0026v=1\n[stevesouders]: http://www.stevesouders.com/blog/2013/09/05/domain-sharding-revisited/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundcloud%2Fsplit-by-name-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoundcloud%2Fsplit-by-name-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundcloud%2Fsplit-by-name-webpack-plugin/lists"}