Skip to content

Commit

Permalink
fix(react-native): add aliasFields to handle replaced files in browse…
Browse files Browse the repository at this point in the history
…r env (#16106)
  • Loading branch information
Singloo authored Apr 6, 2023
1 parent f36d65c commit 7a4adf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/expo/plugins/metro-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ function getPnpmResolver(extensions: string[]) {
modules: [join(workspaceRoot, 'node_modules'), 'node_modules'],
conditionNames: ['native', 'browser', 'require', 'default'],
mainFields: ['react-native', 'browser', 'main'],
aliasFields: ['browser'],
});
}
return resolver;
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/plugins/metro-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ function getPnpmResolver(extensions: string[]) {
modules: [join(workspaceRoot, 'node_modules'), 'node_modules'],
conditionNames: ['native', 'browser', 'require', 'default'],
mainFields: ['react-native', 'browser', 'main'],
aliasFields: ['browser'],
});
}
return resolver;
Expand Down

0 comments on commit 7a4adf5

Please sign in to comment.