Skip to content

Commit 8986a29

Browse files
committed
Refactor plugin check
1 parent cd29faf commit 8986a29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-router-dev/vite/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ async function hasReactRouterRscPlugin({
241241
}: {
242242
root: string;
243243
viteBuildOptions: ViteBuildOptions;
244-
}) {
244+
}): Promise<boolean> {
245245
const vite = await import("vite");
246246
const viteConfig = await vite.resolveConfig(
247247
{
@@ -254,7 +254,7 @@ async function hasReactRouterRscPlugin({
254254
"production", // default mode
255255
"production", // default NODE_ENV
256256
);
257-
return viteConfig.plugins?.find(
257+
return viteConfig.plugins.some(
258258
(plugin) => plugin?.name === "react-router/rsc",
259259
);
260260
}

0 commit comments

Comments
 (0)