Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React Native에 현대적인 빌드 도구 더하기: R...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기

FECONF 2026에서 진행한 본 세션 발표 자료입니다.

Avatar for Geunhyeok LEE

Geunhyeok LEE

October 26, 2026

Other Decks in Programming

Transcript

  1. Metro의 한계 - 느린 빌드 속도 - 트리셰이킹(Tree-Shaking) 미지원 -

    느슨한 모듈 Resolution, Yarn PnP 미지원 - Exports field 등 미흡한 Node 표준 사양 지원 - 번들러 확장의 어려움
  2. 번들러를 만들자: esbuild - Go 언어 기반 빠른 성능 -

    트리셰이킹(Tree-Shaking) 등 번들 최적화 지원 - 엄격한 모듈 Resolution, Yarn PnP 지원 - Exports field 등 Node 표준 사양 지원 - 확장 가능한 플러그인 API 지원
  3. 번들러를 만들자: esbuild - Go 언어 기반 - 트리셰이킹(Tree-Shaking) 등

    번들 최적화 지원 - 엄격한 모듈 Resolution, Yarn PnP 지원 - Exports field 등 Node 표준 Slash사양 23 | 지원 달리는 토스 앱에 React Native 엔진 더하기 FEConf 2023 | React Native, Metro를 넘어서 - 확장 가능한 플러그인 지원
  4. Rollipop 구현기 Code TS? Flow? JavaScript Parser Syntax Lowering Executable

    Code Y TypeScript Parser Y Flow Parser Transform Specs Y Codegen?
  5. Rollipop 구현기: 발견한 문제 1 - 엄청나게 많은 의존성 정보

    - 다양한 타입(HARD, SOFT)으로 링크된 패키지들 - 수 십 MB & 수 십만 라인의 거대한 Manifest (.pnp.cjs) Manifest 내부 데이터 순서가 유지되지 않아 의존성을 찾지 못하는 치명적인 버그 발견
  6. Rollipop 구현기: 발견한 문제 3 - 실행하면 10초 이상 흰

    화면에 머물러 있는 현상 - 런타임이 멈춘 것은 아니고 느리게 실행되는 문제 반드시 해결해야 하는 성능 문제
  7. Rollipop 구현기: 발견한 문제 3 1. Hermes clone 후 직접

    빌드 ( facebook/hermes ) 2. 실행시켜 볼 수 있는 최소 JavaScript 번들 작성 3. 로컬에서 직접 실행하며 병목 구간 프로파일링 $ hermes -Og source.js $ /usr/bin/sample "$PID" 10 1 -mayDie -file sample.txt
  8. Rollipop 구현기: 발견한 문제 3 G (바인딩 수) F (초기화

    함수 수) 모듈 초기화 함수 호출에 소요되는 시간 = O(G · F)
  9. Rollipop 구현기: 발견한 문제 3 G (바인딩 수) 번들 안에는

    수천, 수만 개의 모듈이 포함 모듈 초기화 함수 호출에 소요되는 시간 = O(G · F) F (초기화 함수 수)
  10. Rollipop 구현기: 발견한 문제 3 Problem React Native 특화 기능들을

    구현하기 위해 Y React Native Rolldown을 Hard Fork 하는 전략을 선택 Specific? Contribute to Upstream ???
  11. Rollipop 구현기 - Rust swc_core 기반 구현 - Codegen Babel

    플러그인은 SWC Visitor 로 포팅 - Strip Flow, Syntax Lowering 네이티브 Layer에서 구현 추가로 React Compiler, Reanimated Worklets 변환 등 지원
  12. Rollipop 구현기 - Rust swc_core 기반 구현 - Codegen Babel

    플러그인은 SWC Visitor 로 포팅 - Strip Flow, Syntax Lowering 네이티브 Layer에서 구현 추가로 React Compiler, Reanimated Worklets 변환 등 지원
  13. Interfaces Dev Server Bundler Serve Bundles & Sourcemap CLI React

    Native Middlewares React Native CLI Commands Rolldown Core Serve Assets Programmatic APIs Symbolication Reporter Events Logs SSE MCP Diagnostics & Controls Custom Native Implements React Native Debugger Integration Dashboard DevFrame DevTools
  14. HMR CLI Analyzer Blazing Fast Complete Type Safety DevTools Caching

    System Full-Featured Dev Server Bundle Optimizations Frontend Ecosystem First Drop-In Metro Replacement React Compiler Easy To Migrate Plugin System AI Friendly