-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix: cjs resolution when falling back to parentLoad
#106
Conversation
While testing this I also found that the logged error was not as helpful as it could be.
|
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.
Is there some test that will show the problem being solved here?
The current reproduction that I have requires I'll see if I can reduce it down! |
#108 fixes the issue with Maybe this PR will be required to support |
When falling back to
parentLoad
on parsing errors (#104), we don't consider CJS.For CJS, the
parentLoad
can return{ format: 'commonjs', source: undefined }
. In this case we should be passing this full result through as the result ofload()
. Once we start returning a full result fromgetSource
, it becomes redundant and we can have a singleload
function.