Warp drive
The ship never actually travels at relativistic speeds. While space is being warped, the ship uses its standard, newtonian-physics based impulse engines to move. This is why phasers can be fired at warp - because the ship isn't actually travelling faster than light, it just reaches its destination in a period of time that suggests it were.