Skip to content

Commit

Permalink
Add dependecy import location, error message changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedsahl committed Jun 23, 2020
1 parent e8c68c0 commit 3a22fa4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ async function build(opts) {
]),
onwarn: function (message) {
if (message.code === 'UNRESOLVED_IMPORT') {
throw new Error(`Could not resolve module ` + message.source + `. Try running 'npm install'`)
throw new Error(
`Could not resolve module ` +
message.source +
`. Try running 'npm install' or using rollup's 'external' option if this is an external dependency. ` +
`Module ${message.source} is imported in ${message.importer}`
)
}
}
})
Expand Down

0 comments on commit 3a22fa4

Please sign in to comment.