When Meghan McCain announced that she was leaving “The View” after four years on the ABC talk show, it was thought to be because of her growing family and the network’s insistence that she live in New York.

But with a new book coming out, McCain is being more forthcoming, saying that she was no longer willing to endure the contempt of her co-hosts, who did not agree with her conservative worldview.

“You are targeted if you are the token conservative, and you really are treated differently,” McCain told Fox News talk show host Sean Hannity on Tuesday in her first television interview since leaving the show.

The “Hannity” show aired clips from “The View” in which co-hosts Whoopi Goldberg and Joy Behar treated McCain with open disdain, with an unsmiling Behar telling McCain that she had not missed her while she was on maternity leave and Goldberg telling McCain at one point, “Girl, please stop talking” before cutting the conversation off abruptly.

Hannity described the exchanges as “brutal,” and McCain told him that after the Goldberg incident she had a panic attack backstage. “I vomited in my office. It was horrible. I started crying between commercial breaks, and it was the moment that I just thought that my four years in an anthropological experiment in left-wing media had come to an end.”

Caitlyn Jenner? Abby Huntsman? Who will ‘The View’ choose to replace Meghan McCain?

McCain describes these incidents in “Bad Republican,” an audiobook that will be released Thursday by Audible. It is billed as the memoir of a “maverick spirit” who speaks openly about feeling like she is no longer part of the Republican Party, the pain of losing her father (Arizona Sen. John McCain, who died in 2018), and how a miscarriage and the birth of a daughter have affected her.

But it’s the parting at “The View,” detailed in an excerpt published by Variety, that is generating buzz in advance of the book’s release. In the excerpt, McCain said she respected her co-hosts, but said that working for the show “brings out the worst in people.”

“You can’t imagine how it messes with your self-esteem working in an environment where the worst thing you can be in the world is a Republican during the Trump years,” McCain wrote, saying that as time went on, her treatment by Goldberg, Behar and some of the staff “grew meaner and less forgiving.”

“It was as if I had become an avatar for everything they hated about the president. It felt like the co-hosts and staff only knew one Republican — me — and took out all their anger on me, even though I didn’t even vote for Trump.”

She went on to say that after she returned from maternity leave, she experienced crippling anxiety and was feeling vulnerable and was shocked by the treatment by her co-hosts. “So much for working moms looking out for each other,” she wrote. She also said the experience has caused her to think deeply about how companies should support new mothers, and that she is going to be an advocate for paid family leave, even though that is a controversial topic in conservative circles.

“I was really mad and upset at myself for not being stronger when I got back to work. I felt as if I had failed. I thought to myself, This is why people don’t have children,” she wrote. “Now when I see any woman who’s pregnant or postpartum, all I want to say is, ‘What do you need? How can I help you?’ I never want to work for anyone again who doesn’t look out for new mothers.”

Mitt Romney, Marco Rubio take another shot at paid parental leave

McCain may have a kindred spirit in Condoleezza Rice, director of The Hoover Institution at Stanford University and former secretary of state.

Rice was a guest host on “The View” on Wednesday, and according to the entertainment website Decider, it didn’t go well, citing negative tweets from viewers, who were “pleased to see her to the door.”

Meanwhile, neither Behar nor Goldberg have responded to McCain’s charges, at least not on their Twitter accounts, although Behar does have one thing in common with McCain: She, too, has a new book coming out this month, a takedown of former President Donald Trump called “The Great Gasbag.”