{"id":15801527,"url":"https://github.com/char0n/ramda-tree-shaking-webpack","last_synced_at":"2026-05-15T01:06:58.182Z","repository":{"id":136894108,"uuid":"597014033","full_name":"char0n/ramda-tree-shaking-webpack","owner":"char0n","description":"POC of ramda tree shaking using webpack","archived":false,"fork":false,"pushed_at":"2023-02-05T16:14:23.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-06T01:23:00.011Z","etag":null,"topics":["ramda","shaking","tree","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/char0n.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-03T12:41:58.000Z","updated_at":"2023-02-03T13:20:41.000Z","dependencies_parsed_at":"2023-04-14T01:30:49.600Z","dependency_job_id":null,"html_url":"https://github.com/char0n/ramda-tree-shaking-webpack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Framda-tree-shaking-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Framda-tree-shaking-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Framda-tree-shaking-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Framda-tree-shaking-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/char0n","download_url":"https://codeload.github.com/char0n/ramda-tree-shaking-webpack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246547251,"owners_count":20794969,"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":["ramda","shaking","tree","webpack"],"created_at":"2024-10-05T01:23:04.608Z","updated_at":"2025-10-28T23:02:22.265Z","avatar_url":"https://github.com/char0n.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ramda-tree-shaking-webpack\nPOC of ramda tree-shaking using webpack\n\n### Conclusion\n\nThe key to properly **tree-shake** ramda imports is to:\n\n- use [ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)\n- use webpack `mode=production` which sets proper defaults to [webpack optimization config](https://webpack.js.org/configuration/optimization/#optimizationusedexports)\n- if you want to adjust [webpack optimization config](https://webpack.js.org/configuration/optimization/#optimizationusedexports) make sure following options are always enabled:\n\n```js\n{\n  mode: 'production', // drops \"dead code\" from the bundle by setting proper defaults to `optimization` config\n  optimization: {\n    sideEffects: true, // tells webpack to recognise the sideEffects flag in package.json, ramda is side effects free\n    minimize: true, // needs to be set to `true` for proper tree-shaking\n    providedExports: true, // if set to `true` it gives far better results\n    usedExports: true, // needs to be set to `true` for proper tree-shaking\n    concatenateModules: true, // needs to be set to `true` for proper tree-shaking\n  }\n}\n```\n\n---\n\n### Development setup\n\n```sh\n $ git clone git@github.com:char0n/ramda-tree-shaking-webpack.git\n $ npm i --verbose\n```\n\n### Testing npm scripts\n\nAll the below-mentioned scripts create a UMD bundle in `./dist/main.js` file.\n\n**Builds source code with no user defined config (using webpack defaults)**:\n\n```sh\n $ npm run build build:webpack:no-config\n```\n\n**Builds source code with simple user defined config**:\n\n```sh\n $ npm run build build:webpack:config-simple\n```\n\n**Builds source code with simple user defined config and using babel**:\n\n```sh\n $ npm run build build:webpack:config-babel\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchar0n%2Framda-tree-shaking-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchar0n%2Framda-tree-shaking-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchar0n%2Framda-tree-shaking-webpack/lists"}