Miner operating a front end loader loading material into haul trucks. During the process a fire sparked inside the engine compartment. Miner noticed fire, stopped loader and shut down the engine. Miner then evacuated to the ground and left the immediate area. The fire was isolated to the loader only. No other property damage occurred.