Replies: 1 comment
-
Please open an issue in Next.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm frontend engineer.
I was wondering if anyone could let me know how to prevent from using
named
export.Situation & Problem
This question is related vercel/next.js#63803
Next.js supports the custom loader for optimized the images at other CDN provider.
But If I export the loader function as named, Next.js occurs the error
This is because Next.js internally replaces
defaultLoader
withcustom loader
(config.images.loaderFile
) through webpack config(resolve.alias
) during build timeNext.js uses webpack for build. So
_imageloader.default
isundefined
if exporting loader asnamed
.But the error that Next.js occurs, is a bit confusing the developers.
So I want Next.js to show the accurate error message like this:
Question
Could I know whether or not I export as
named
through webpack config?I think it is possible to know it ONLY runtime.
Beta Was this translation helpful? Give feedback.
All reactions