-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nextjs] Move the import startsWith next check at end #228
Conversation
* This fixes the resolve error happening in nextjs for it's path based module imports. * Also adds check for `next/link` * Ignore null value during css object processing
if (!value) { | ||
// ignore null value | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you review this instead #229
dabcee4
to
bf715be
Compare
return require.resolve(what); | ||
} | ||
if (what === 'next/image') { | ||
if (what === 'next/image' || what === 'next/link') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If what==='next/link'
we still import next-image
? @brijeshb42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both just point to a dummy module for wyw evaluation to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
next/link just provides a default export which is already there in the next-image file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a bit confusing 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just rename the next-image file to next-module-stub
or similar to remove the confusion.
It's on our side and not user facing.
next/link
Fixes #204