Skip to content

Commit

Permalink
Missing exports errors now print the importing module
Browse files Browse the repository at this point in the history
Prior to this change, we only printed the imported module
that failed, with no context on which module was attempting
the import. This could be difficult to debug in large codebases,
especially when importing commonly-used modules.
  • Loading branch information
Timothy Asquith committed Feb 25, 2020
1 parent db576f3 commit d5f9cae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Module.ts
Expand Up @@ -157,7 +157,9 @@ function handleMissingExport(
return importingModule.error(
{
code: 'MISSING_EXPORT',
message: `'${exportName}' is not exported by ${relativeId(importedModule)}`,
message: `'${exportName}' is not exported by ${relativeId(
importedModule
)}, importing module: ${importingModule.id}`,
url: `https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module`
},
importerStart!
Expand Down

0 comments on commit d5f9cae

Please sign in to comment.