Repository navigation
Conversation
The Expo example exports for the web through react-native-web with the same compiled output as iOS and Android. CI checks the web bundle as the others and opens it in Chromium: the card's theme color and its switch, the input's focus style and a button press. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #411, depends on #1050 (base:
feat/react-native-compat). PR 11 of the React Native plan: Expo web (D5).What it does
As decided in D5, the web build of an Expo app uses the same native output as iOS and Android. Metro compiles it with
platform: 'web', and react-native-web turns theStyleSheetobjects into CSS. The compiler already tookwebas a platform (with_webblocks) since #1044, so this PR proves the whole path end to end and documents it.apps/expo:react-native-web~0.21.4and@expo/metro-runtime~58.0.17. It also addsreact-dom^19.3.1, so that it matches the workspace's React exactly. SDK 58's19.3.0would have moved the hoistedreact-domunder every other app."web"toplatformsin app.json, and--platform webtoexport.testIDs to the card, the input and the two buttons. react-native-web renders them asdata-testid.check-bundle.mjs: it now checks the web bundle as well, with the same assertions as iOS and Android:Pressable's style function;App.tsx.check-web.mjs(new): it servesdist/and opens it in Chromium (Playwright), then checks what react-native-web renders:rgb(255, 255, 255)in the light theme;#5a44ff;#5a44ffon focus, through the runtime'sFocused;rgb(31, 31, 46).expojob exports all three platforms, then installs Chromium with the existing Playwright steps (record revisions, restore cache, install) and runscheck:web.packages/react/src/utils/(theme-context|with-theme), which the native runtime now imports (feat(native): compile styled-components/native and @emotion/native #1050).feat/react-native-compatis added to thepull_requestbranches of the workflow. It will be removed when this PR is retargeted._webblocks, and_hover/_focusfollowing the mouse and the keyboard;bun.lockadds the three packages. Hoisting movedstyleq0.2.1 under@stylexjs/stylex, which keeps it, because react-native-web needs 0.1.x. Nothing else changes.Verification
Locally:
bun run exportwrites iOS (951 modules), Android (949) and web (667) bundles;node check-bundle.mjspasses for all three;node check-web.mjsprints "web: react-native-web renders the compiled styles".No library code changes in this PR.
#411의 일부이며 #1050에 의존합니다 (base:
feat/react-native-compat). React Native 계획의 11번째 PR인 Expo web(D5)입니다.변경 내용
D5 결정대로 Expo 앱의 웹 빌드는 iOS·Android와 같은 네이티브 출력을 씁니다. Metro가
platform: 'web'으로 컴파일하고, react-native-web이StyleSheet객체를 CSS로 바꿉니다. 컴파일러는 #1044부터web플랫폼(_web블록 포함)을 받았으므로, 이 PR은 전체 경로가 끝까지 동작함을 검증하고 문서화합니다.apps/expo:react-native-web~0.21.4와@expo/metro-runtime~58.0.17을 추가했습니다.react-dom은 워크스페이스의 React와 정확히 맞도록^19.3.1을 씁니다. SDK 58의19.3.0을 쓰면 hoist된react-dom이 다른 모든 앱 아래로 바뀌기 때문입니다.platforms에"web"을,export에--platform web을 추가했습니다.testID를 추가했습니다. react-native-web은 이를data-testid로 렌더링합니다.check-bundle.mjs: 이제 웹 번들도 iOS·Android와 같은 항목으로 검사합니다:Pressable의 style 함수;App.tsx가 쓰는 런타임.check-web.mjs(신규):dist/를 서빙해 Chromium(Playwright)으로 연 뒤, react-native-web이 렌더링한 결과를 확인합니다:rgb(255, 255, 255);#5a44ff;Focused를 통해, focus하면 입력란 테두리가#5a44ff;rgb(31, 31, 46).expojob은 세 플랫폼을 export한 뒤, 기존 Playwright 단계(revision 기록, cache 복원, 설치)로 Chromium을 설치하고check:web을 실행합니다.packages/react/src/utils/(theme-context|with-theme)(feat(native): compile styled-components/native and @emotion/native #1050)도 포함합니다.pull_requestbranches에feat/react-native-compat을 추가했습니다. 이 PR의 base를 바꿀 때 제거합니다._web블록, 마우스·키보드를 따르는_hover/_focus;bun.lock에는 세 패키지가 추가되었습니다. react-native-web이 0.1.x를 요구하므로, hoisting으로styleq0.2.1은 그것을 쓰는@stylexjs/stylex아래로 옮겨졌습니다. 그 밖의 변경은 없습니다.검증
로컬에서:
bun run export가 iOS(951 modules)·Android(949)·web(667) 번들을 만듭니다;node check-bundle.mjs가 세 번들 모두 통과합니다;node check-web.mjs가 "web: react-native-web renders the compiled styles"를 출력합니다.이 PR에는 라이브러리 코드 변경이 없습니다.
🤖 Generated with Claude Code