I was cleaning up my rollup builds today and I came across my builds. When I was looking deep into it I saw packages which are marked as external are also included by this plugin in my output bundle.
So in my config I'm doing something like this
external: Object.keys(packageJson.peerDependencies) but seems like node-resolve is not considering them. So looking at the docs I came across only option so to try that out this what I added to my config
Now after this my externals are not being bundled but rollup throws warning which treats transitive dependencies of these dependencies as external. Isn't this weird?
I was cleaning up my rollup builds today and I came across my builds. When I was looking deep into it I saw packages which are marked as
external
are also included by this plugin in my output bundle. So in my config I'm doing something like thisexternal: Object.keys(packageJson.peerDependencies)
but seems likenode-resolve
is not considering them. So looking at the docs I came acrossonly
option so to try that out this what I added to my configNow after this my externals are not being bundled but rollup throws warning which treats transitive dependencies of these
dependencies
as external. Isn't this weird?Here's my
rollup.config.js