facebookarchive/prepack ? reverse-engineered prompt

Reverse engineered prompt

Build me a JavaScript tool that takes a JS file or bundle, figures out as much as it can ahead of time, and rewrites it into faster code that still behaves the same.

I want a command line app where I can run it on a file and either print the processed code or save it to another file. It should also have an interactive REPL for trying things out, plus a solid test setup so I can run the serializer and conformance tests. If there’s a simple demo site or docs page in the repo, make sure that still works too.

Please keep it usable from the terminal, make the build and run commands straightforward, and leave the project in a state where I can install dependencies, build it, run tests, and try the optimizer on a sample JavaScript file. If you need to check current docs or behavior, look them up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab