Before the RD1 had been released Leica said several times it would not be possible to build a digital rangefinder because the lens was too close to the sensor.Sorry, but when I tried to be friendly with an R-D1 it did absolutely nothing for me at all. Felt crude and clumsy to use, and the image files didn't look as good as what I was getting out of a Pentax *ist DS with essentially the same sensor. I sent it back.
The Leica M8 was predated in release by the Epson R-D1 by only seven months or so, which meant that the Leica M8 product development had likely been ongoing from about the same time, or even before as Leica products are traditionally so long in development. The M8 was instantly a far more sophisticated product at release time. So I think it's completely incorrect to say "Leica would never have made a digital M if Epson hadn't shown it was possible."
I'm certain that Leica was working on a digital, M-mount compatible rangefinder as soon as they thought there was a feasible sensor to be had for it, and to the limit that their development resources and finances could sustain at the time.
G
And after the release of the M8 and delivery-how long did it take?
For me Epson was the first who was brave enough to deliver a digital rangefinder. I then switched to the M8 because it was the better camera, but I did like the build and feel and analaog instruments of the RD1 including the sutter sound .