{"id":15491549,"url":"https://github.com/diegohaz/webpack-sort-chunks","last_synced_at":"2025-04-22T19:21:16.781Z","repository":{"id":57158384,"uuid":"89894386","full_name":"diegohaz/webpack-sort-chunks","owner":"diegohaz","description":"Sorts webpack chunks by dependency","archived":false,"fork":false,"pushed_at":"2018-07-26T21:48:13.000Z","size":146,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T10:05:19.970Z","etag":null,"topics":["webpack"],"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/diegohaz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-01T03:25:05.000Z","updated_at":"2022-08-21T15:41:38.000Z","dependencies_parsed_at":"2022-09-07T21:01:05.595Z","dependency_job_id":null,"html_url":"https://github.com/diegohaz/webpack-sort-chunks","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fwebpack-sort-chunks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fwebpack-sort-chunks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fwebpack-sort-chunks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohaz%2Fwebpack-sort-chunks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegohaz","download_url":"https://codeload.github.com/diegohaz/webpack-sort-chunks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306601,"owners_count":21408927,"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":["webpack"],"created_at":"2024-10-02T07:54:12.270Z","updated_at":"2025-04-22T19:21:16.752Z","avatar_url":"https://github.com/diegohaz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-sort-chunks\n\n[![Generated with nod](https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square)](https://github.com/diegohaz/nod)\n[![NPM version](https://img.shields.io/npm/v/webpack-sort-chunks.svg?style=flat-square)](https://npmjs.org/package/webpack-sort-chunks)\n[![Build Status](https://img.shields.io/travis/diegohaz/webpack-sort-chunks/master.svg?style=flat-square)](https://travis-ci.org/diegohaz/webpack-sort-chunks) [![Coverage Status](https://img.shields.io/codecov/c/github/diegohaz/webpack-sort-chunks/master.svg?style=flat-square)](https://codecov.io/gh/diegohaz/webpack-sort-chunks/branch/master)\n\nSorts webpack chunks by dependency\n\n\u003e The source code here is vendored from [html-webpack-plugin/lib/chunksorter.js](https://github.com/jantimon/html-webpack-plugin/blob/master/lib/chunksorter.js)\n\n## Install\n\n    $ npm install --save webpack-sort-chunks\n\n## Usage\n\n```js\nimport sortChunks from 'webpack-sort-chunks'\n\nconst sortedChunks = sortChunks(stats.chunks)\n\n// If you hold on to the Webpack compilation, pass it as the second argument\n// It will be faster in Webpack \u003e= v4\nconst sortedChunks = sortChunks(stats.chunks, compilation)\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [Compilation](#compilation)\n    -   [Properties](#properties)\n-   [sortChunks](#sortchunks)\n    -   [Parameters](#parameters)\n\n### Compilation\n\nType: {chunkGroups: {}}\n\n#### Properties\n\n-   `chunkGroups` **{}** \n\n### sortChunks\n\n#### Parameters\n\n-   `chunks` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;Chunk\u003e** \n-   `compilation` **[Compilation](#compilation)** \n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;Chunk\u003e** \n\n## License\n\nMIT © [Diego Haz](https://github.com/diegohaz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegohaz%2Fwebpack-sort-chunks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegohaz%2Fwebpack-sort-chunks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegohaz%2Fwebpack-sort-chunks/lists"}