Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: Classnames plugin handles key and value other way around
  • Loading branch information
dipsaus9 committed Nov 30, 2022
commit 1214d003b216a3015c0181804ac5fe1e267a2694
10 changes: 9 additions & 1 deletion lib/util/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,15 @@ function parseNodeRecursive(node, arg, cb, skipConditional = false, isolate = fa
return;
case 'ObjectExpression':
arg.properties.forEach((prop) => {
parseNodeRecursive(node, prop.key, cb, skipConditional, forceIsolation);
const isUsedByClassNamesPlugin = node.callee && node.callee.name === 'classnames';

parseNodeRecursive(
node,
isUsedByClassNamesPlugin ? prop.key : prop.value,
cb,
skipConditional,
forceIsolation
);
});
return;
case 'Literal':
Expand Down
Loading