From a8a814705941470e26276a99e985bd5820601a81 Mon Sep 17 00:00:00 2001
From: Brijesh Bittu <brijesh42@gmail.com>
Date: Fri, 13 Sep 2024 13:01:26 +0530
Subject: [PATCH] [nextjs] Fix react import check bug introduced in #228

---
 packages/pigment-css-nextjs-plugin/src/index.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/pigment-css-nextjs-plugin/src/index.ts b/packages/pigment-css-nextjs-plugin/src/index.ts
index 04d9576f..2b343fe8 100644
--- a/packages/pigment-css-nextjs-plugin/src/index.ts
+++ b/packages/pigment-css-nextjs-plugin/src/index.ts
@@ -75,6 +75,7 @@ export function withPigment(nextConfig: NextConfig, pigmentConfig?: PigmentOptio
           // has a lot of RSC specific logic which is not actually needed.
           if (
             what === 'react' ||
+            what.startsWith('react/') ||
             what.startsWith('react-dom/') ||
             what.startsWith('@babel/') ||
             what.startsWith('next/')