Near-packaged optics