Skip to content

Commit 4f25845

Browse files
committed
fix: use the same method for devMiddleware import
1 parent 0c53293 commit 4f25845

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/repack/src/commands/common/getDevMiddleware.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import url from 'node:url';
2+
13
export async function getDevMiddleware(reactNativePath: string) {
24
const reactNativeCommunityCliPluginPath = require.resolve(
35
'@react-native/community-cli-plugin',
@@ -8,5 +10,6 @@ export async function getDevMiddleware(reactNativePath: string) {
810
paths: [reactNativeCommunityCliPluginPath],
911
});
1012

11-
return import(devMiddlewarePath);
13+
const { href: fileUrl } = url.pathToFileURL(devMiddlewarePath);
14+
return await import(fileUrl);
1215
}

0 commit comments

Comments
 (0)