# facebookarchive/prepack

A JavaScript bundle optimizer.

Repository: https://github.com/facebookarchive/prepack
Canonical: https://ross.abutalabs.com/products/prepack
Homepage: http://prepack.io
Language: JavaScript
License: NOASSERTION
License Family: other
Topics: javascript, optimization
Archived: true
Last push: 2022-02-11T05:19:57+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3962, "days_push": 1664, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 14109, forks 412 (observed 2026-08-28T04:11:05.498512+00:00)

## What it is
Prepack is a partial evaluator for JavaScript that rewrites bundles by executing computations at compile time and replacing global code with equivalent sequences of assignments. It ships as an npm CLI and Node.js API, with community plugins for Webpack, Rollup, and Parcel.

## Use cases
- optimize a javascript bundle to run faster
- precompute initialization-heavy code at build time
- eliminate abstraction overhead in javascript modules
- evaluate module initialization ahead of runtime
- fold constant computations like fibonacci into literals
- prepack a bundle with source maps

## When to choose
- you have initialization-heavy JavaScript where startup cost dominates
- you want to experiment with partial evaluation of JS bundles
- you need a research-grade compile-time evaluator for JavaScript

## When to avoid
- you need a maintained tool - the project is archived and development was set down by Facebook
- you need production-ready optimization for modern toolchains
- your code depends heavily on runtime environment or non-deterministic values like Date.now or Math.random

## Facets
- artifact type: cli-tool
- maturity: abandoned
- function: compiler, build-tool, developer-tools
- domain: web-development, frontend, developer-tools, performance
- platform: cli, cross-platform
- tags: partial-evaluation, javascript-optimizer, bundle-optimization, precompilation, facebook, archived, nodejs

## Member repositories
- facebookarchive/prepack (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:05.498512+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:12:48.758096+00:00, confidence not recorded.
  - readme: https://github.com/facebookarchive/prepack (fetched 2026-08-28T04:11:05.498512+00:00, sha b6f7d947f192)
  - homepage: http://prepack.io (fetched 2026-08-29T08:07:00.413571+00:00, sha f0fcad06b5fc)
  - site_page: https://prepack.io/getting-started.html (fetched 2026-08-29T08:07:00.416631+00:00, sha 16c968703cb5)
  - site_page: https://prepack.io/frequently-asked-questions.html (fetched 2026-08-29T08:07:00.418771+00:00, sha 962ce917d07e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
