Skip to content

Commit df2b429

Browse files
committed
Add error handling for missing dependencies
1 parent 13f91a4 commit df2b429

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build/build.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ async function build(opts) {
2929
__VERSION__: version,
3030
'process.env.SSR': false
3131
})
32-
])
32+
]),
33+
onwarn: function (message) {
34+
if (message.code === 'UNRESOLVED_IMPORT') {
35+
throw new Error(`Could not resolve module ` + message.source)
36+
}
37+
}
3338
})
3439
.then(function (bundle) {
3540
var dest = 'lib/' + (opts.output || opts.input)

0 commit comments

Comments
 (0)