Skip to content

Commit 063de7a

Browse files
authored
fix: expose reactNativePath for Re.Pack getDevMiddleware (#582)
* fix: expose reactNativePath for Re.Pack getDevMiddleware * chore: add changeset
1 parent 7c3d633 commit 063de7a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/ninety-apples-retire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rock-js/plugin-repack': patch
3+
---
4+
5+
Expose reactNativePath in pluginRepack.ts to prevent undefined error in Re.Pack getDevMiddleware when starting up dev server

packages/plugin-repack/src/lib/pluginRepack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const pluginRepack =
4040
name: 'start',
4141
description: 'Starts Re.Pack dev server.',
4242
action: async (args: StartArgs) => {
43+
const reactNativePath = api.getReactNativePath();
4344
const root = api.getProjectRoot();
4445
const platforms = api.getPlatforms();
4546
const { port, startDevServer } = await findDevServerPort(
@@ -54,7 +55,7 @@ export const pluginRepack =
5455
startCommand.func(
5556
[],
5657
// @ts-expect-error TODO fix getPlatforms type
57-
{ root, platforms, ...pluginConfig },
58+
{ reactNativePath, root, platforms, ...pluginConfig },
5859
{ ...args, port },
5960
);
6061
},

0 commit comments

Comments
 (0)