rollup/rollup-plugin-node-resolve

Resolve errors are swallowed

chinesedfan opened this issue · 2 comments

https://github.com/rollup/rollup-plugin-node-resolve/blob/master/src/index.js#L162

Shall err be handled first? For example, if I require('non-existed-pkg'), this plugin just throws nothing.

I tried it.

Console output:

$ rollup -c

src/index.js → dist/bundle.js...
(!) Unresolved dependencies
https://rollupjs.org/guide/en#warning-treating-module-as-external-dependency
nonexistentmodule (imported by src/index.js)
created dist/bundle.js in 97ms
Done in 0.60s.

I think is OK behavior. Modules compiled with rollup can use external dependencies that can be called in runtime later.

Can be closed now. Repen if need.

Seems fixed by #183 and released in v4.0.1. Thanks.