Rents in San Francisco and Silicon Valley have reached such unprecedented heights that some , some , and even some residents making six-figures can . Now, Google's parent company, Alphabet, has come up with a patch: It is paying about $30 million to provide temporary, prefab housing for 300 of its employees.

According to The Wall Street Journal, Alphabet is making a significant investment in modular housing built and shipped in from elsewhere by the start-up Factory OS, because the current local offerings are so overpriced: "San Francisco have jumped by almost 50 percent since 2010, while have increased 98 percent since the bottom of the market in 2009."

Rents for these apartments are expected to be more moderate. Factory OS founder and CEO Rick Holliday tells the Journal that "a previous project that Holliday built using modular technology saved tenants $700 a month in rent because of reduced construction costs."

Other tech companies are also taking action on behalf on their workers, the Journal reports:

As Silicon Valley battles its severe housing shortage, tech companies are becoming more active in trying to help solve the problem. Facebook Inc. has pledged to plan and design 1,500 units in Menlo Park, of which 15 percent will be classified as affordable housing. The project is still in the early planning phase. A spokesman said the company is considering modular housing and is supportive of Mr. Holliday's project and "anything that has the potential to accelerate building housing in the Bay Area."

Forbes points out that tech companies continue to grow and hire in Silicon Valley, which will exacerbate the area's housing shortage.

Apple Inc. has already begun moving thousands of its employees into Apple Park, the company's new 2.8-million-square-foot circular building in Cupertino, Calif., that resembles a spaceship. Facebook Inc. and Alphabet Inc. have tapped top architects Frank Gehry and Bjarke Ingels for expansions. Salesforce.com Inc. paid to put its name on a new, 61-story tower that will be the tallest building in San Francisco.

A recent study by Apartment List found that millennials in San Jose, Calif., have the longest wait to purchase a home of anyone in the generation nationwide: Odds are they won't be in a good position to buy an apartment there for "almost 24 years," or "until the year 2041."

Don't miss: Google employees could buy 5 houses for the price of one if they left Silicon Valley