Transpiler / bundler example or documentation?
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 859
- Avg merge
- 1h 30m
- Merged PRs (30d)
- 3
Description
## Problem
I wanted to run some benchmarks on v8 and hermes to compare proxy performance because I'm having perf issues on react-native Android using mobx, which relies heavily on proxies. I wasn't able to figure out a bundler/transpiler configuration that was able to emit code that would run on hermes.
Bun and esbuild can't downlevel features low enough to accommodate hermes lack of class, let, const, async, etc. I tried rollup + babel but bundling to a single file with rollup in IIFE mode appears to result in globals like `setTimeout` being unavailable. I tried metro, but trying to use it outside of react native I couldn't get it configured to emit a bundle properly.
## Solution
It would be great if the hermes repo included an example with a bundler configuration that can transpile modern TS down to a level that it can be run with the `hermes` binary. Either that or a short documentation addition detailing which tools can work and what configuration they need.
This would make it a lot easier to use hermes outside of react native.
## Additional Context
Contributor guide
Research direction
Start from the Hermes binary workflow and reproduce the listed Babel/Rollup, Bun, and Metro attempts with a minimal modern TypeScript input. Compare the resulting configuration and runtime behavior, then document or demonstrate a setup that emits a runnable bundle with globals such as setTimeout available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, bun, javascript, react-native, rollup, typescript
- Domain
- build-system, developer-experience, documentation, tooling
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100