Tesla expects to spend up to $6 billion on factories and equipment over the next two years as it ramps up production and develops new vehicles, the company said in a regulatory filing Friday.

The electric car maker said it expects to spend just under $2.5 billion in capital investments for 2018 and $2.5 billion to $3 billion annually over the next two years.

Tesla is also planning to build a factory in China, which it is calling Gigafactory 3, where it hopes to eventually produce 3,000 of its popular Model 3 sedans a week. The filing cautioned that the time frame on its production targets was "subject to a number of uncertainties, including regulatory approval, supply chain constraints, and the pace of bringing the factory online."

Gigafactory 1 is the company's plant near Clark, Nevada, where it makes batteries and parts of the Model 3 drive train. Gigafactory 2 is its solar power plant in Buffalo, New York.

Tesla is planning to start producing Model 3s in Shanghai to reduce the impact of tariffs. Because Tesla currently exports all of its vehicles to China, it has been hurt by stiff tariffs, some of which result from the trade war between China and the U.S.

Shares of Tesla were flat Friday morning.

In the filing, the company also revealed that the Justice Department and SEC are investigating Model 3 production targets.

The company has been burning through cash as it ramps up production and deliveries of its Model 3 midsize sedan, and it has big plans for the years ahead. Tesla unveiled an electric semi-truck last year but has not said much since then about when and how the company will produce the vehicles.

It is also planning a crossover sport utility vehicle called the Model Y, and a second-generation version of the Tesla Roadster that CEO Elon Musk has said will be quicker and faster than any other car on the road. Musk has also talked about his desire to make a pickup truck.

It also is attempting to build a business in rooftop solar power systems. In 2016, Musk revealed a planned roof tile that could collect solar power, but the company has so far shipped only a few systems.

WATCH: How taxpayers have boosted Elon Musk and Tesla