Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brijesh Bittu committed Sep 11, 2024
1 parent 689a35d commit dabcee4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/pigment-css-nextjs-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ export function withPigment(nextConfig: NextConfig, pigmentConfig?: PigmentOptio
// Need to point to the react from node_modules during eval time.
// Otherwise, next makes it point to its own version of react that
// has a lot of RSC specific logic which is not actually needed.
if (what.startsWith('@babel') || what.startsWith('react') || what.startsWith('next')) {
if (
what === 'react' ||
what.startsWith('react-dom/') ||
what.startsWith('@babel/') ||
what.startsWith('next/')
) {
return require.resolve(what);
}
if (asyncResolve) {
Expand Down

0 comments on commit dabcee4

Please sign in to comment.