fix: cjs resolution when falling back to parentLoad#106
fix: cjs resolution when falling back to parentLoad#106timfish wants to merge 4 commits intonodejs:mainfrom
parentLoad#106Conversation
|
While testing this I also found that the logged error was not as helpful as it could be. |
jsumners-nr
left a comment
There was a problem hiding this comment.
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
parentLoadon parsing errors (#104), we don't consider CJS.For CJS, the
parentLoadcan 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 singleloadfunction.