Over the weekend, Tesla raised prices on the Model S and Model X by over $20,000 (depending on configuration) as a result of the ongoing trade war between the US and China. While there previously was a 25 percent import tax, it didn't stop the region from buying Tesla's cars. Last year the automaker sold 14,779 vehicles in the country, and the country represented almost 20 percent of Tesla's revenue. Then China raised the import duties for American-made vehicles by an additional 15 percent as a response to President Trump's trade war.

It isn't entirely clear what Tesla will build at the factory, but Musk has previously hinted that it'd likely be a site for Model 3 and Model Y (the company's crossover vehicle) production. Those cars still need batteries, though, and Tesla's lone battery factory is in Nevada.

Musk has been talking about building a plant in China long before Trump added 25 percent import duties to over 1,300 Chinese products including steel, iron and touchscreens. The move will cut down on shipping fees, for starters, but it will also help Musk reach the production numbers and profitability he's been chasing for years.

Harley Davidson recently did something similar. As a means of sidestepping the trade war Trump started with Europe by adding tariffs to imported aluminum and steel, the company announced that it'd shift production of motorcycles destined for European customers to the continent.

Now to see how fast Tesla can build in China and if the factory will be up and running before this trade war ends.

Update: A Tesla spokesperson reached out to offer the following statement:

"Last year, we announced that we were working with the Shanghai Municipal Government to explore the possibility of establishing a factory in the region to serve the Chinese market. Today, we have signed a Cooperative Agreement for Tesla to start building Gigafactory 3, a new electric vehicle manufacturing facility in Shanghai. We expect construction to begin in the near future, after we get all the necessary approvals and permits.

From there, it will take roughly two years until we start producing vehicles and then another two to three years before the factory is fully ramped up to produce around 500,000 vehicles per year for Chinese customers. Tesla is deeply committed to the Chinese market, and we look forward to building even more cars for our customers here.

Today's announcement will not impact our U.S. manufacturing operations, which continue to grow."