Turning the beloved 1982 comedy “Tootsie” into a 21st century musical already seemed like a challenge when work on the adaptation began back in 2016. Then the #MeToo movement revved up — and the writers knew they couldn’t tell Dorothy’s story for a modern audience without it.

“It’s different than it was when the movie came out, but it’s also different than it was three years ago,” composer Daniel Yazbek told Variety after the show’s Broadway premiere on Tuesday night. “Everything changed with the #MeToo movement.”

“We knew that we had to handle the issues of the movie in a more contemporary and a more intelligent way,” he said. He was also acutely aware of the fact that he, book writer Robert Horn and director Scott Ellis are all men. “We were a male creative team for the most part, so we were constantly touching base with the women working on the show and with others,” he said, citing lead producer Carol Fineman and musical director Andrea Grody as key to the story’s development.

“I thought it was important first and foremost that we created powerful female characters, unlike the movie,” Horn added — a process that also involved working closely with the women who would bring those characters to life on stage.

Lilli Cooper, who stars opposite Santino Fontana, told Variety that she “felt like I needed to bring a new Julie to the story. We completely updated her independence, her relationships with the people in her life — particularly the men.”

Part of that meant drawing from her own life. “As a woman of color who has been working in the industry for several years, the experiences that I’ve lived have definitely fueled the writing of this character,” she said. “She’s very close to who I am; it really felt special playing her.”

Following in Jessica Lange’s footsteps was daunting, but as Cooper put it, “I wanted to do something that scared me” — and she was determined to make the character her own.

Sarah Stiles, who plays Sandy, took a similar tack; while she had seen “Tootsie” before, she avoided revisiting the original after she was cast. “I knew that Teri Garr was unreal in the movie, so I didn’t go and watch it again — when I got the script, I took it as a new project and that was it. It’s a totally different time that we’re living in now, so we can’t do the same thing that the movie did, because it wouldn’t speak to this audience.”

The new Sandy decidedly does — women have come up to Stiles after the show to thank her for giving a voice to their experiences and anxieties. “I think the struggle of someone who’s trying to make it in this business is something that a lot of people can relate to,” she said. “What’s great about it in the musical as opposed to the movie is that we get to see Sandy’s entire arc. We get to see her have a happy ending because she’s empowered. So, that’s something that’s very relevant and beautiful and exciting to be able to play.”

Fontana, who stars as Michael Dorsey (and his female alter ego, Dorothy Michaels), considers these changes essential to the musical’s success. “This could have gone really badly,” he told Variety, laughing. While he was excited by the part when Ellis approached him, he was also “terrified.”

“I was one of the first people to say, ‘Listen. We gotta do this right,’” he said. He immediately reached out to feminist writer Rebecca Traister, the author of “Good and Mad,” “and other feminist playwright friends of mine, who were great sounding boards to remind me of what’s really the most important.”

So, what did those conversations with Traister teach him? “She highlighted how, yes, the physical stuff is funny, and the superficial-level stuff is great, but the real difference is the power difference,” Fontana explained. Issues of safety, sexual harassment, job security and equal pay came to the forefront. “This is all in our script, thank God. And Michael is identifying with the crap that women have to deal with daily, and he’s trying to find a way — knowing he’s made the worst decision of his life, but one that changed him for the better, eventually — to pay it forward, which is what we should all be doing. Men have to listen, but we have to be part of that conversation.”

Fontana was “100%” more of a feminist than his character going into the project, but post-#MeToo, he had noticed some uncertainty even within his own social circles. “There are so many of my friends, we consider ourselves progressive dudes — and granted, we don’t know what we don’t know — but I didn’t want to offend women by wanting to help. I didn’t want to say the wrong thing or jump in on their territory. So that was one of the first things I asked Rebecca: ‘How do I help without insulting anybody or offending anybody?’ But I think that’s what our show is about. And the great thing is that’s all secondary to the humor of the show.”

“Rebecca really has her finger on the zeitgeist,” Yazbek said. “Being able to ask, ‘Are we being oversensitive in this case, and is that hurting the comedy, or are we not being sensitive enough in order to do what we think is helping the comedy?’ was vital. It’s very helpful to talk to someone who isn’t even a comedy writer necessarily, but who thinks about this stuff and looks at the whole picture.”

In the eyes of the “Tootsie” team, the jokes that emerged from those conversations serve a purpose. As Horn put it, “I truly believe if you can make people laugh, you can make them think.”