Direct imaging instruments have the spatial resolution to resolve exoplanets from their host star. This enables direct characterization of the exoplanets atmosphere, but most direct imaging instruments do not have spectrographs with high enough resolving power for detailed atmospheric characterization. We investigate the use of a single-mode diffraction-limited integral-field unit that is compact and easy to integrate into current and future direct imaging instruments for exoplanet characterization. This achieved by making use of recent progress in photonic manufacturing to create a single-mode fiber-fed image reformatter. The fiber link is created with three- dimensional printed lenses on top of a single-mode multicore fiber that feeds an ultrafast laser inscribed photonic chip that reformats the fiber into a pseudoslit. We then couple it to a first-order spectrograph with a triple stacked volume phase holographic grating for a high efficiency over a large bandwidth. The prototype system has had a successful first-light observing run at the 4.2-m William Herschel Telescope. The measured on-sky resolving power is between 2500 and 3000, depending on the wavelength. With our observations, we show that single-mode integral-field spectroscopy is a viable option for current and future exoplanet imaging instruments.