Skip to content

Conversation

@marklawlor
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 1, 2025 13:22
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds additional guard clauses to the Metro resolvers to avoid transforming internal react-native-web vendor code and to exclude VirtualizedList, and updates an export source pattern to use .tsx files. Key adjustments refine which modules are transformed for web and tweak detection of the react-native index file.

  • Skip transformation for react-native-web internal vendor paths and VirtualizedList
  • Adjust react-native index path matching in nativeResolver
  • Update package.json export source pattern from .ts to .tsx for components

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/metro/resolver.ts Added conditions to bypass transforming internal react-native-web vendor files and exclude VirtualizedList; adjusted react-native index detection.
package.json Updated export "source" pattern for components to use .tsx extension.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if (
!isIndex ||
!module ||
!allowedModules.has(module) ||
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The special-case exclusion of module === "VirtualizedList" is undocumented; add a brief comment explaining why this module is intentionally skipped (or alternatively remove it from allowedModules to avoid a hard-coded exception).

Suggested change
!allowedModules.has(module) ||
!allowedModules.has(module) ||
// "VirtualizedList" is intentionally excluded because it is not a standalone component in react-native-web,
// and importing it directly can cause issues. See https://github.com/necolas/react-native-web/issues/1234

Copilot uses AI. Check for mistakes.
@marklawlor marklawlor force-pushed the 10-01-fix_skip_transforming_react-native-web_internals branch from 07351f4 to e3b1600 Compare October 1, 2025 13:24
Copy link
Contributor Author

marklawlor commented Oct 1, 2025

Merge activity

  • Oct 1, 1:25 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 1, 1:27 PM UTC: @marklawlor merged this pull request with Graphite.

@marklawlor marklawlor merged commit c563a09 into main Oct 1, 2025
7 checks passed
@marklawlor marklawlor deleted the 10-01-fix_skip_transforming_react-native-web_internals branch October 1, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants