A method may involve forming a cross-linked polymer plug over a sensor located on a structure, such that the sensor is covered by the cross-linked polymer plug. The sensor is configured to detect an analyte. The method may involve forming a first polymer layer, which defines a posterior side of an eye-mountable device. Further, the method may involve positioning the structure on the first polymer layer. Still further, the method may involve forming a second polymer layer over the first polymer layer and the structure to provide a partially-fabricated device. The second polymer layer defines an anterior side of the eye-mountable device. The method may also involve soaking the partially-fabricated device in a fluid, such that the cross-linked polymer plug swells out of the partially-fabricated device to leave a channel in the second polymer layer, wherein the sensor is configured to receive the analyte via the channel.