{"id":17659755,"url":"https://github.com/raphamorim/webpack-2-vs-rollup","last_synced_at":"2025-07-18T08:36:47.814Z","repository":{"id":75482609,"uuid":"76997579","full_name":"raphamorim/webpack-2-vs-rollup","owner":"raphamorim","description":"Comparison between Webpack 2 and Rollup","archived":false,"fork":false,"pushed_at":"2017-03-23T17:21:27.000Z","size":131,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-06T15:49:21.588Z","etag":null,"topics":["benchmark","berchmarking","comparison","rollup","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphamorim.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":"2016-12-20T22:51:10.000Z","updated_at":"2024-08-31T02:08:07.000Z","dependencies_parsed_at":"2023-06-06T15:15:24.848Z","dependency_job_id":null,"html_url":"https://github.com/raphamorim/webpack-2-vs-rollup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raphamorim/webpack-2-vs-rollup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fwebpack-2-vs-rollup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fwebpack-2-vs-rollup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fwebpack-2-vs-rollup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fwebpack-2-vs-rollup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphamorim","download_url":"https://codeload.github.com/raphamorim/webpack-2-vs-rollup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fwebpack-2-vs-rollup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265728956,"owners_count":23818733,"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":["benchmark","berchmarking","comparison","rollup","webpack"],"created_at":"2024-10-23T16:08:12.097Z","updated_at":"2025-07-18T08:36:47.788Z","avatar_url":"https://github.com/raphamorim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack 2 VS Rollup\n\nThe idea is to compare the build between [Webpack 2](https://github.com/webpack/webpack) and [Rollup](https://github.com/rollup/rollup), checking features like Tree Shaking (recently added in Webpack 2).\n\nNote: Unlike tests like [this one](https://gist.github.com/forabi/2a538b263d0f1fe5f041), It'll check the comparison between differences about **file compression**, without create a separated source map file.\n\n## Comparison\n\nWebpack Version: `2.3.1`\n\nRollup Version: `0.41.6`\n\n| . | Compressed without sourcemap | Separate Sourcemap Size\n| --- | --- | --- |\n| Webpack | ~28 KB | ~360K\n| Rollup | ~20 KB | ~144K\n\n## Example.js\n\n```js\nimport concat from 'lodash-es/concat';\nimport sortBy from 'lodash-es/sortBy';\nimport map from 'lodash-es/map';\nimport sample from 'lodash-es/sample';\n\n// Example: sortBy\nconst users = [\n  { 'user': 'fred',   'age': 48 },\n  { 'user': 'barney', 'age': 36 },\n  { 'user': 'fred',   'age': 42 },\n  { 'user': 'barney', 'age': 34 }\n];\nconst exampleSortBy = sortBy(users, function(o) { return o.user; });\nconsole.log(exampleSortBy);\n\n// Example: map\nconst exampleMap = map(users, 'user');\nconsole.log(exampleMap);\n\n// Example: concat\nconst array = [1];\nconst exampleConcat = concat(array, 2, [3], [[4]]);\nconsole.log(exampleConcat);\n\n// Example: sample\nconst exampleSample = sample([1, 2, 3, 4]);\nconsole.log(exampleSample);\n```\n\n## Run tests\n\nJust run:\n\n```\n$ npm install \u0026\u0026 make comparison\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Fwebpack-2-vs-rollup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphamorim%2Fwebpack-2-vs-rollup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Fwebpack-2-vs-rollup/lists"}