Open marcoNonvanilla opened 2 years ago
our testable components which use next/image are configured this way:
import * as NextImage from 'next/image';
const OriginalNextImage = NextImage.default;
if (process.env.TEST_ENV === 'vreg') {
Object.defineProperty(NextImage, 'default', {
configurable: true,
value: (props) => (
<OriginalNextImage {...props} unoptimized loader={({ src }) => src} />
),
});
}
Viteshot does not fully support NextJs. Things like next image currently don't work.