Most likely very little. Sulfur cathodes would just be deposited on the tape like any other cathode, and the gigafactory could freely switch to any other standard chemistry after some setup time and adjustments. More radical (and also much less likely) changes would have bigger impacts. Lithium metal batteries would probably require replacing some significant machinery. Solid electrolyte or ceramic batteries could need almost an entirely new production line. Metal air batteries would be almost completely incompatable.
Realistically, there are probably no changes coming in the next 30 years that will require rebuilding anything significant.
Realistically, there are probably no changes coming in the next 30 years that will require rebuilding anything significant.