Study: on-bike resistance training (standing start sprints) vs weight training
Cyclists do not need to incorporate off-bike resistance training to increase strength, muscle-tendon structure, and pedaling performance: Exploring a high-intensity on-bike method (link to google scholar which links to full pdf)
TL:DR both work
at least over 10 weeks in trained cyclists