Full approval for the plant from the Chinese government is yet to be received, though an initial agreement was signed Tuesday by Musk and Shanghai officials. The plant is expected to be constructed in a special free-trade zone where Tesla won't have to partner with a local automaker. There could be some tariffs initially, though Tesla would still benefit from lower costs made possible from improved logistics and access to the local supply chain.

Currently, all foreign automakers looking to build cars in China need to form a 50:50 joint venture with a local automaker, or face the same 25-percent tariff placed on imported cars, though the Chinese government is planning to ease this restriction by 2022. However, the 25-percent tariff has now been increased to 40 percent on U.S.-made cars as part of China's retaliation toward tariffs on various Chinese-made goods entering the U.S. announced by the Trump administration this month.

In response to the tariff increase, Tesla is increasing prices in China. Its Chinese website now lists the cheapest price for a Model S sedan at $128,500, up from $107,400 previously.

Tesla said the Chinese plant won't affect its production expansion plans in the U.S. The company currently has a vehicle plant in California and a battery plant in Nevada, and in May it said it was looking for a site for a new plant to handle production of its upcoming Model Y small SUV.

Beyond the tariffs, building cars in China is a heck of an opportunity for Tesla. China has implemented an aggressive low-emission strategy to combat its air quality problems, with the country aiming to reach seven million electric car sales by 2025. Currently, only 15 percent of Tesla’s sales come from China, despite the car market there being the world’s biggest.