Automakers and battery companies are spending unprecedented sums of money as they build out North America’s EV supply chain.