The move by the electric car maker comes as the US-China trade war forces firms to rethink supply chains.