-or
has lower precedence than -and
(which is the default connector), so you need to explicitly increase your disjunction’s “priority”:
find . -path "./dist" -prune -or \( -iname "*.js" -or -iname "*.jsx" \) -exec grep "foo" {} +
-or
has lower precedence than -and
(which is the default connector), so you need to explicitly increase your disjunction’s “priority”:
find . -path "./dist" -prune -or \( -iname "*.js" -or -iname "*.jsx" \) -exec grep "foo" {} +