From cea8c421e0d7cc3e7452f9caab918ca65b30fe00 Mon Sep 17 00:00:00 2001 From: leegeunhyeok Date: Mon, 1 Jan 2024 21:53:34 +0900 Subject: [PATCH] wip --- .../lib/buildStatusPlugin/buildStatusPlugin.ts | 3 +-- .../reactNativeRuntimeTransformPlugin.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/plugins/lib/buildStatusPlugin/buildStatusPlugin.ts b/packages/plugins/lib/buildStatusPlugin/buildStatusPlugin.ts index 7edc0b7b..d9033e9b 100644 --- a/packages/plugins/lib/buildStatusPlugin/buildStatusPlugin.ts +++ b/packages/plugins/lib/buildStatusPlugin/buildStatusPlugin.ts @@ -26,13 +26,12 @@ export const createBuildStatusPlugin: PluginFactory = ( config.handler.onBuildStart(buildContext); }); - build.onResolve({ filter }, (args) => { + build.onResolve({ filter }, (args): undefined => { const isRelative = args.path.startsWith('.'); statusLogger.onResolve( isRelative ? path.resolve(args.resolveDir, args.path) : args.path, ); config.handler.onBuild(buildContext, statusLogger.getStatus()); - return null; }); build.onLoad({ filter }, () => { diff --git a/packages/plugins/lib/reactNativeRuntimeTransformPlugin/reactNativeRuntimeTransformPlugin.ts b/packages/plugins/lib/reactNativeRuntimeTransformPlugin/reactNativeRuntimeTransformPlugin.ts index ab1d0da3..57d94247 100644 --- a/packages/plugins/lib/reactNativeRuntimeTransformPlugin/reactNativeRuntimeTransformPlugin.ts +++ b/packages/plugins/lib/reactNativeRuntimeTransformPlugin/reactNativeRuntimeTransformPlugin.ts @@ -14,14 +14,14 @@ export const createReactNativeRuntimeTransformPlugin: PluginFactory = ( transformJsonAsJsModule(buildContext, build); - build.onResolve({ filter }, (args) => - args.kind === 'entry-point' - ? { - path: args.path, - pluginData: { isEntryPoint: true }, - } - : null, - ); + build.onResolve({ filter }, (args) => { + if (args.kind === 'entry-point') { + return { + path: args.path, + pluginData: { isEntryPoint: true }, + }; + } + }); build.onLoad({ filter }, async (args) => { const moduleId = buildContext.moduleManager.getModuleId(