{"id":17599298,"url":"https://github.com/taxigy/try-prepack","last_synced_at":"2025-03-29T21:12:21.242Z","repository":{"id":91298895,"uuid":"90278086","full_name":"taxigy/try-prepack","owner":"taxigy","description":"Try Prepack (https://prepack.io)","archived":false,"fork":false,"pushed_at":"2017-05-04T15:16:20.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T21:46:58.300Z","etag":null,"topics":["experiment","prepack"],"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/taxigy.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":"2017-05-04T15:15:59.000Z","updated_at":"2017-05-04T15:29:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f42cf0eb-ab35-44ac-8917-66241cc38cd2","html_url":"https://github.com/taxigy/try-prepack","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/taxigy%2Ftry-prepack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taxigy%2Ftry-prepack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taxigy%2Ftry-prepack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taxigy%2Ftry-prepack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taxigy","download_url":"https://codeload.github.com/taxigy/try-prepack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246243553,"owners_count":20746311,"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":["experiment","prepack"],"created_at":"2024-10-22T10:24:53.545Z","updated_at":"2025-03-29T21:12:21.222Z","avatar_url":"https://github.com/taxigy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Try Prepack with Webpack\n\nThis is a tryout of [Prepack](/facebook/prepack), a tool to minimize the JS code via partial evaluation, so that instead of\n\n```javascript\nconst MINUTE = 1000 * 60;\n```\n\nthe result contains evaluated code:\n\n```javascript\nconst MINUTE = 60000;\n```\n\nI was curious if it is applicable to React code, and looks like it is only partially applicable due to lots of unsupported breaking things in highly complex React code. For one, I found that\n\n```javascript\nimport { renderToStaticMarkup } from 'react-dom/server';\n```\n\nwould throw an exception and never proceed. Webpack would never output anything. So this stub is very basic because of that as well.\n\n## Result\n\nJust as expected: what can be evaluated, is evaluated, and Webpack's IIFE gets reduced into a little line of code, giving significant win in the output:\n\n```bash\n$ # without Prepack\n$ yarn webpack \u003e /dev/null; du -sh ./build/index.js\n148K\t./build/index.js\n\n$ # with Prepack\n$ ENABLE_PREPACK=true yarn webpack \u003e /dev/null; du -sh ./build/index.js\n4.0K\t./build/index.js\n```\n\nwith some insignificant increase in processing time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaxigy%2Ftry-prepack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaxigy%2Ftry-prepack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaxigy%2Ftry-prepack/lists"}