Files
Webklar.com/node_modules/next/dist/esm/shared/lib/image-external.js
Basilosaurusrex f027651f9b main repo
2025-11-24 18:09:40 +01:00

25 lines
883 B
JavaScript

import { getImgProps } from "./get-img-props";
import { warnOnce } from "./utils/warn-once";
import { Image } from "../../client/image-component";
// @ts-ignore - This is replaced by webpack alias
import defaultLoader from "next/dist/shared/lib/image-loader";
const unstable_getImgProps = (imgProps)=>{
warnOnce("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");
const { props } = getImgProps(imgProps, {
defaultLoader,
// This is replaced by webpack define plugin
imgConf: process.env.__NEXT_IMAGE_OPTS
});
for (const [key, value] of Object.entries(props)){
if (value === undefined) {
delete props[key];
}
}
return {
props
};
};
export default Image;
export { unstable_getImgProps, };
//# sourceMappingURL=image-external.js.map