Starting next year, every new home built in California will have something extra on top.

Recently, California became the first state in the nation to make solar mandatory for new houses. Beginning in 2020, newly constructed homes must have solar panels, which could be costly for homeowners: According to California's Energy Commission (CEC), that mandate will add between $8,000 and $10,000 to the cost of a new home.

CEC estimates suggest that the solar addition will increase the average monthly mortgage payment by $40, but new homeowners will save an average of $80 a month on their heating, cooling and lighting bills.

Still, the requirement does add a costly additional expense to already pricey new homes in one of the richest real estate markets in the country.

Danielle Hale, chief economist at Realtor.com, told CNBC's "On the Money" that the new solar requirement could undermine a segment of the real estate market that's struggled to add to new homes relative to demand.

The added costs could hit "the affordable side of the market," she said, where prices on available homes have been under pressure.

"It's a very different perspective depending on if you're looking for affordable homes, or pricier homes," Hale told CNBC. "It's already difficult for builders to build, and I think this is just going to exacerbate that problem."