On the balance sheet it doesn't look good, but if you think about the strategic impact it will have on the business once they can bring costs down and ramp up installations, I think it's more fair to call it an investment.
So it's a bit of both in this case.
They have Giga Nevada which is already the world's biggest battery plant (although technically a lot of the production is Panasonic.
They also make batteries at their China factory
They've also said they will make batteries at both Giga Berlin and Giga Texas, and they're increasing their operations in California, including making more batteries.
I think it's safe to say they are scaling up production extremely fast, and I'd be interested to hear of another company scaling faster than they are.
CATL scaled much faster than Tesla - the company was founded in 2011, and they are now the leader in battery production with >30% of production. They are still increasing production. They managed to double their battery production from 10GWh/year to >20GWh between 2016 and 2018.
CATL is on track this year to produce around 140GWh of batteries, which will mean that their highest producing factory has to produce more than 35GWh. Tesla says they can produce 500k Model3/Y battery packs per year at Giga Nevada which at a generous 75kWh/pack means they may, in theory, match the smallest possible biggest factory from CATL. In reality what this means is that Giga Nevada is not the world's biggest battery plant - it's the world's biggest battery plant from plants which publish their precise production rates, but nonetheless at best #2.