A compact optical sensor package for use in an optical mouse. The optical sensor package includes a chip enclosure which is physically and electrically bonded to a main circuit Board using Ball Grid Array (BGA) technology. The chip enclosure includes a windowed cover having a window, and a base board hermetically sealed to the windowed cover to enclose the sensor chip. The sensor chip is electrically connected to bonding pads on the inner surface of the base plate. The bonding pads are electrically connected through the base plate to bonding pads on the outer surface of the base plate. The bonding pads on the outer surface of the base plate are elements in this application of Ball Grid Array technology.