See my comment in https://github.com/facebook/react/pull/11291#issuecomment-338974574.
I verified https://github.com/facebook/react/pull/11291 introduced this regression.
if (node[SEEN_SYMBOL]) {
            return;
          }
          
          
          
          if (
            path.get('callee').isIdentifier({name: 'require'}) &&
            path.get('arguments')[0] &&
            path.get('arguments')[0].isStringLiteral({value: 'invariant'})
          ) {
            node[SEEN_SYMBOL] = true;
            getProdInvariantIdentifier(path, this);
          } else if (path.get('callee').isIdentifier({name: 'invariant'})) {