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 bf715be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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
4 changes: 0 additions & 4 deletions packages/pigment-css-react/src/utils/cssFnValueToVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ function iterateAndReplaceFunctions(
const css = styleObj as StyleObj;
Object.keys(css).forEach((key) => {
const value = css[key];
if (!value) {
// ignore null value
return;
}

if (typeof value === 'object') {
if (!Array.isArray(value)) {
Expand Down

0 comments on commit bf715be

Please sign in to comment.