{"id":17921795,"url":"https://github.com/3axap4ehko/entries-webpack-plugin","last_synced_at":"2025-04-03T10:44:51.388Z","repository":{"id":57225757,"uuid":"140873944","full_name":"3axap4eHko/entries-webpack-plugin","owner":"3axap4eHko","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-28T17:34:37.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-23T00:13:46.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3axap4eHko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-07-13T17:15:27.000Z","updated_at":"2018-07-13T21:05:16.000Z","dependencies_parsed_at":"2024-10-25T22:30:42.215Z","dependency_job_id":"f6bf0145-30ef-4b17-9eff-d33125fc5653","html_url":"https://github.com/3axap4eHko/entries-webpack-plugin","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"87daf247458bb6f2b7fc41ce903f55882e11a056"},"previous_names":["3axap4ehko/dump-webpack-plugin"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Fentries-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Fentries-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Fentries-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3axap4eHko%2Fentries-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3axap4eHko","download_url":"https://codeload.github.com/3axap4eHko/entries-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246989501,"owners_count":20865306,"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-10-28T20:36:10.275Z","updated_at":"2025-04-03T10:44:51.356Z","avatar_url":"https://github.com/3axap4eHko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entries Webpack Plugin\n\nOutputs webpack assets chunks for entries to a json file\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n\n## Problem\n\nWebpack 4 optimization splits code of entry to chunks.\nSo in the result you can have a few chunks for the entry and some of the entries can share some chunks.\n\n## Solution\n\nTo get all chunks for a entry you can use `entries-webpack-plugin`\n\nwebpack config\n```js\n\nfunction extraAssetMiddelware(compilation, entries, cb) {\n  entries.extra = {\n    css: [`extra-asset.${compilation.hash}.css`],\n  };\n  cb(entries);\n}\n\n// ...\n\n{\n  // ...\n  entry: {\n    index: 'index.js',\n    about: 'about.js',\n  },\n  optimization: {\n    // ...\n  }\n  // ...\n  plugins: [\n    new EntriesPlugin({\n      filename: 'entries.json',\n      pretty: true,\n      middlewares: [\n        extraAssetMiddelware,\n      ]\n    }),\n  ]\n}\n```\nwhere index and about share common js and css libs\nas the result of optimization you will have `vendors~index~about~post` common `js` and `css` chunks\nso output is\n```json\n{\n  \"index\": {\n    \"js\": [\n      \"vendors~index~about.c025d01e7caee3789803.js\",\n      \"index.c025d01e7caee3789803.js\"\n    ],\n    \"css\": [\n      \"vendors~index~about.c025d01e7caee3789803.css\"\n    ]\n  },\n  \"about\": {\n    \"js\": [\n      \"vendors~index~about.c025d01e7caee3789803.js\",\n      \"about.c025d01e7caee3789803.js\"\n    ],\n    \"css\": [\n      \"vendors~index~about.c025d01e7caee3789803.css\"\n    ]\n  },\n  \"extra\": {\n    \"css\": [\n      \"extra-asset.025d01e7caee3789803.css\"\n    ]\n  }\n}\n```\n## License\nLicense [The MIT License](http://opensource.org/licenses/MIT)\nCopyright (c) 2018 Ivan Zakharchanka\n\n[downloads-image]: https://img.shields.io/npm/dm/entries-webpack-plugin.svg?longCache=true\u0026style=for-the-badge\n[npm-url]: https://www.npmjs.com/package/entries-webpack-plugin\n[npm-image]: https://img.shields.io/npm/v/entries-webpack-plugin.svg?longCache=true\u0026style=for-the-badge\n\n[travis-url]: https://travis-ci.org/3axap4eHko/entries-webpack-plugin\n[travis-image]: https://img.shields.io/travis/3axap4eHko/entries-webpack-plugin/master.svg?longCache=true\u0026style=for-the-badge","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3axap4ehko%2Fentries-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3axap4ehko%2Fentries-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3axap4ehko%2Fentries-webpack-plugin/lists"}