You really need to know what you are doing. And you asked so therefore I assume that you don't 8D.
Some freehub bodies will clash with the lip on the hub shell. You also need to use the correct cone for the freehub body.
Also flanges are wider apart on 135mm axle M73X series 7 speed hubs than on 130mm. And are really difficult to do 8-speed well on.
The "period" bodge for those of us to stingy to buy XTR/M737 was to use a road 8-speed hub with an MTB axle and an extra 5mm spacer on the NDS.
Completed: 94 Stumpjumper w. M733; ; 92 Dave Yates 731 ; 97 Parkpre Pro-Elite ; Pace RC200 F6 ; Pace RC300; 82 Gios Super Record ; 97-8 De Rosa Giro D´Italia; ; Banani SPX Track bike ; 89 Alan/Mavic Cross Bike ; 05 Focus Cross Team ; 90 Look MI-80 all-Mavic ; 12 Focus Izalco Team/custom build ; 11 Focus Thunder Custom build
Projects : , Brouwer all-Mavic
Stripped : Pace RC303
Gone : GT Karakoram
Stayed in the family: Kuota Kharma, 04 Stumpjumper FSR
Ceased to be : Dynatech MT3, killed by corroded seatstays.