Skip to content

Commit

Permalink
fix: support non-classic paths to HMRClient from react-native (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbroma committed Apr 5, 2024
1 parent 421b803 commit e83734a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dry-trains-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@callstack/repack": patch
---

Support non-classic(pnpm) paths to HMRClient from react-native
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class RepackTargetPlugin implements WebpackPlugin {

// Replace React Native's HMRClient.js with custom Webpack-powered DevServerClient.
new webpack.NormalModuleReplacementPlugin(
/react-native([/\\]+)Libraries([/\\]+)Utilities([/\\]+)HMRClient\.js$/,
/react-native.*?([/\\]+)Libraries([/\\]+)Utilities([/\\]+)HMRClient\.js$/,
function (resource) {
const request = require.resolve('../../../modules/DevServerClient');
const context = path.dirname(request);
Expand Down

0 comments on commit e83734a

Please sign in to comment.