Files
StevenandGitHub 7102050ec7 Add support for images.loaderFile config (#41585)
This PR adds a new configure property, `images.loaderFile` that allow
you to define a path to a file with an exported image loader function.

This is useful when migrating from `next/legacy/image` to `next/image`
because it lets you configure the loader for every instance of
`next/image` once, similar to the legacy "built-in loaders".
2022-10-21 12:31:53 -07:00

11 lines
224 B
JavaScript

import Image from 'next/legacy/image'
const loader = undefined
export default () => (
<div>
<p>Should succeed during export</p>
<Image alt="icon" src="/i.png" width="10" height="10" loader={loader} />
</div>
)