Skip to content

Commit

Permalink
fix(react-native): add aliasFields to handle replaced files in brow…
Browse files Browse the repository at this point in the history
…ser env

closed #16105
  • Loading branch information
Singloo committed Apr 5, 2023
1 parent 9bea1fe commit f0d2b29
Showing 1 changed file with 1 addition and 0 deletions.
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 f0d2b29

Please sign in to comment.